Doctrine\ODM\MongoDB\Mapping\ClassMetadata::newInstance PHP Method

newInstance() public method

Creates a new instance of the mapped class, without invoking the constructor.
public newInstance ( ) : object
return object
    public function newInstance()
    {
        return $this->instantiator->instantiate($this->name);
    }

Usage Example

Ejemplo n.º 1
0
 /** {@inheritdoc} */
 public function newInstance()
 {
     return $this->classMetadata->newInstance();
 }