_entityGenerator) { throw new RuntimeException('For the AnnotationExporter you must set an EntityGenerator instance with the setEntityGenerator() method.'); } $this->_entityGenerator->setGenerateAnnotations(true); $this->_entityGenerator->setGenerateStubMethods(false); $this->_entityGenerator->setRegenerateEntityIfExists(false); $this->_entityGenerator->setUpdateEntityIfExists(false); return $this->_entityGenerator->generateEntityClass($metadata); } /** @return string */ protected function _generateOutputPath(ClassMetadataInfo $metadata) { return $this->_outputDir . '/' . str_replace('\\', '/', $metadata->name) . $this->_extension; } /** @return void */ public function setEntityGenerator(EntityGenerator $entityGenerator) { $this->_entityGenerator = $entityGenerator; } }