lib/PHPPdf/Core/Node/NodeFactory.php
public function create($name)
    {
        $name = $this->resolveName($name);

        $prototype = $this->getPrototype($name);
        $product = $prototype->copy();        
        
        foreach($this->invocationsMethodsOnCreate[$name] as $methodName => $argTag)
        {
            if(isset($this->invokeArgs[$argTag]))
            {
                $arg = $this->invokeArgs[$argTag];
                $product->$methodName($arg);
            }
        }

        return $product;
    }
public function create($name)
    {
        $name = $this->resolveName($name);

        $prototype = $this->getPrototype($name);
        $product = $prototype->copy();        
        
        foreach($this->invocationsMethodsOnCreate[$name] as $methodName => $argTag)
        {
            if(isset($this->invokeArgs[$argTag]))
            {
                $arg = $this->invokeArgs[$argTag];
                $product->$methodName($arg);
            }
        }

        return $product;
    }
public function create ( $ name ) { $ name = $ this -> resolveName ( $ name ) ; $ prototype = $ this -> getPrototype ( $ name ) ; $ product = $ prototype -> copy ( ) ; foreach ( $ this -> invocationsMethodsOnCreate [ $ name ] as $ methodName => $ argTag ) { if ( isset ( $ this -> invokeArgs [ $ argTag ] ) ) { $ arg = $ this -> invokeArgs [ $ argTag ] ; $ product -> $ methodName ( $ arg ) ; } } return $ product ; }
Create copy of node stored under passed name

@param string Name/key of prototype

@return Node Deep copy of node stored under passed name
@throws PHPPdf\Exception\UnregisteredNodeException If prototype with passed name dosn't exist
Create copy of node stored under passed name