1
0
mirror of synced 2025-02-20 14:13:15 +03:00

Throw exception when entity generator is not set

This commit is contained in:
Jonathan H. Wage 2010-04-14 14:17:09 -04:00
parent d150f8a6f7
commit 3afc8f794a

View File

@ -49,6 +49,9 @@ class AnnotationExporter extends AbstractExporter
*/
public function exportClassMetadata(ClassMetadataInfo $metadata)
{
if ( ! $this->_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);