public function createNode($discriminator = 'default')
    {
        $reflection = new \ReflectionClass($this->getClassByDiscriminator($discriminator));

        $instance = $reflection->newInstance();
        if($instance instanceof NodeInterface)
        {
            return $instance;
        }

        return null;
    }
public function createNode($discriminator = 'default')
    {
        $reflection = new \ReflectionClass($this->getClassByDiscriminator($discriminator));

        $instance = $reflection->newInstance();
        if($instance instanceof NodeInterface)
        {
            return $instance;
        }

        return null;
    }
public function createNode ( $ discriminator = 'default' ) { $ reflection = new \ ReflectionClass ( $ this -> getClassByDiscriminator ( $ discriminator ) ) ; $ instance = $ reflection -> newInstance ( ) ; if ( $ instance instanceof NodeInterface ) { return $ instance ; } return null ; }
create a new ContentNode instance by discriminator value
@param string $discriminator
@return NodeInterface
@throws \Exception
create a new ContentNode instance by discriminator value