i would prefer to inject the dm into this initializer and use phpcr-odm to create documents. that needs a lot less inside knowledge.