provide support to export entities with all its references

Solves #14 
In general there is no point in having a static method beside autoloading which is a solved problem in newer PHP versions.