Doctrine\OXM\Mapping\ClassMetadata::newInstance PHP Méthode

newInstance() public méthode

Creates a new instance of the mapped class, without invoking the constructor.
public newInstance ( ) : object
Résultat object
    public function newInstance()
    {
        if ($this->prototype === null) {
            $this->prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
        }
        return clone $this->prototype;
    }