protected function processDocumentProxy(SchemaManager $sm, $document) { $this->getDocumentManager()->getProxyFactory()->generateProxyClasses(array($this->getMetadataFactory()->getMetadataFor($document))); }