/** * Initializes a new ClassMetadata instance that will hold the object-relational mapping * metadata of the class with the given name. * * @param string $entityName The name of the entity class the new instance is used for. */ public function __construct($entityName) { parent::__construct($entityName); $this->reflClass = new ReflectionClass($entityName); $this->namespace = $this->reflClass->getNamespaceName(); $this->table['name'] = $this->reflClass->getShortName(); }
/** * Initializes a new ClassMetadata instance that will hold the object-relational mapping * metadata of the class with the given name. * * @param string $entityName The name of the entity class the new instance is used for. */ public function __construct($entityName) { $this->reflClass = new ReflectionClass($entityName); $this->namespace = $this->reflClass->getNamespaceName(); $this->table['name'] = $this->reflClass->getShortName(); parent::__construct($this->reflClass->getName()); // do not use $entityName, possible case-problems }