Doctrine\OXM\Mapping\ClassMetadataInfo::__construct PHP Method

__construct() public method

Initializes a new ClassMetadata instance that will hold the object-xml mapping metadata of the class with the given name.
public __construct ( string $entityName )
$entityName string The name of the entity class the new instance is used for.
    public function __construct($entityName)
    {
        $this->name = $entityName;
        $this->rootXmlEntityName = $entityName;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Initializes a new ClassMetadata instance that will hold the object-document mapping
  * metadata of the class with the given name.
  *
  * @param string $entityName The name of the document 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->xmlName = Inflector::xmlize($this->reflClass->getShortName());
 }