Neos.Fusion/Classes/Core/Runtime.php
protected function instantiateFusionObject($fusionPath, $fusionConfiguration)
    {
        $fusionObjectType = $fusionConfiguration['__objectType'];

        $fusionObjectClassName = isset($fusionConfiguration['__meta']['class']) ? $fusionConfiguration['__meta']['class'] : null;

        if (!preg_match('#<[^>]*>$#', $fusionPath)) {
            // Only add Fusion object type to last path part if not already set
            $fusionPath .= '<' . $fusionObjectType . '>';
        }
        if (!class_exists($fusionObjectClassName)) {
            throw new Exception(sprintf(
                'The implementation class `%s` defined for Fusion object of type `%s` does not exist.
				Maybe a typo in the `@class` property.',
                $fusionObjectClassName, $fusionObjectType), 1347952109);
        }

        /** @var $fusionObject AbstractFusionObject */
        $fusionObject = new $fusionObjectClassName($this, $fusionPath, $fusionObjectType);
        if ($this->isArrayFusionObject($fusionObject)) {
            /** @var $fusionObject AbstractArrayFusionObject */
            if (isset($fusionConfiguration['__meta']['ignoreProperties'])) {
                $evaluatedIgnores = $this->evaluate($fusionPath . '/__meta/ignoreProperties', $fusionObject);
                $fusionObject->setIgnoreProperties(is_array($evaluatedIgnores) ? $evaluatedIgnores : []);
            }
            $this->setPropertiesOnFusionObject($fusionObject, $fusionConfiguration);
        }
        return $fusionObject;
    }
protected function instantiateFusionObject($fusionPath, $fusionConfiguration)
    {
        $fusionObjectType = $fusionConfiguration['__objectType'];

        $fusionObjectClassName = isset($fusionConfiguration['__meta']['class']) ? $fusionConfiguration['__meta']['class'] : null;

        if (!preg_match('#<[^>]*>$#', $fusionPath)) {
            // Only add Fusion object type to last path part if not already set
            $fusionPath .= '<' . $fusionObjectType . '>';
        }
        if (!class_exists($fusionObjectClassName)) {
            throw new Exception(sprintf(
                'The implementation class `%s` defined for Fusion object of type `%s` does not exist.
				Maybe a typo in the `@class` property.',
                $fusionObjectClassName, $fusionObjectType), 1347952109);
        }

        /** @var $fusionObject AbstractFusionObject */
        $fusionObject = new $fusionObjectClassName($this, $fusionPath, $fusionObjectType);
        if ($this->isArrayFusionObject($fusionObject)) {
            /** @var $fusionObject AbstractArrayFusionObject */
            if (isset($fusionConfiguration['__meta']['ignoreProperties'])) {
                $evaluatedIgnores = $this->evaluate($fusionPath . '/__meta/ignoreProperties', $fusionObject);
                $fusionObject->setIgnoreProperties(is_array($evaluatedIgnores) ? $evaluatedIgnores : []);
            }
            $this->setPropertiesOnFusionObject($fusionObject, $fusionConfiguration);
        }
        return $fusionObject;
    }
protected function instantiateFusionObject ( $ fusionPath , $ fusionConfiguration ) { $ fusionObjectType = $ fusionConfiguration [ '__objectType' ] ; $ fusionObjectClassName = isset ( $ fusionConfiguration [ '__meta' ] [ 'class' ] ) ? $ fusionConfiguration [ '__meta' ] [ 'class' ] : null ; if ( ! preg_match ( '#<[^>]*>$#' , $ fusionPath ) ) { // Only add Fusion object type to last path part if not already set $ fusionPath .= '<' . $ fusionObjectType . '>' ; } if ( ! class_exists ( $ fusionObjectClassName ) ) { throw new Exception ( sprintf ( 'The implementation class `%s` defined for Fusion object of type `%s` does not exist.
				Maybe a typo in the `@class` property.' , $ fusionObjectClassName , $ fusionObjectType ) , 1347952109 ) ; } /** @var $fusionObject AbstractFusionObject */ $ fusionObject = new $ fusionObjectClassName ( $ this , $ fusionPath , $ fusionObjectType ) ; if ( $ this -> isArrayFusionObject ( $ fusionObject ) ) { /** @var $fusionObject AbstractArrayFusionObject */ if ( isset ( $ fusionConfiguration [ '__meta' ] [ 'ignoreProperties' ] ) ) { $ evaluatedIgnores = $ this -> evaluate ( $ fusionPath . '/__meta/ignoreProperties' , $ fusionObject ) ; $ fusionObject -> setIgnoreProperties ( is_array ( $ evaluatedIgnores ) ? $ evaluatedIgnores : [ ] ) ; } $ this -> setPropertiesOnFusionObject ( $ fusionObject , $ fusionConfiguration ) ; } return $ fusionObject ; }
Instantiates a Fusion object specified by the given path and configuration

@param string $fusionPath Path to the configuration for this object instance
@param array $fusionConfiguration Configuration at the given path
@return AbstractFusionObject
@throws Exception
Instantiates a Fusion object specified by the given path and configuration