protected function buildObjectByFactory($objectName)
    {
        $configurationManager = $this->get(ConfigurationManager::class);
        $factory = $this->get($this->objects[$objectName]['f'][0]);
        $factoryMethodName = $this->objects[$objectName]['f'][1];

        $factoryMethodArguments = [];
        foreach ($this->objects[$objectName]['fa'] as $index => $argumentInformation) {
            switch ($argumentInformation['t']) {
                case ObjectConfigurationArgument::ARGUMENT_TYPES_SETTING:
                    $factoryMethodArguments[$index] = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $argumentInformation['v']);
                break;
                case ObjectConfigurationArgument::ARGUMENT_TYPES_STRAIGHTVALUE:
                    $factoryMethodArguments[$index] = $argumentInformation['v'];
                break;
                case ObjectConfigurationArgument::ARGUMENT_TYPES_OBJECT:
                    $factoryMethodArguments[$index] = $this->get($argumentInformation['v']);
                break;
            }
        }

        if (count($factoryMethodArguments) === 0) {
            return $factory->$factoryMethodName();
        } else {
            return call_user_func_array([$factory, $factoryMethodName], $factoryMethodArguments);
        }
    }
protected function buildObjectByFactory($objectName)
    {
        $configurationManager = $this->get(ConfigurationManager::class);
        $factory = $this->get($this->objects[$objectName]['f'][0]);
        $factoryMethodName = $this->objects[$objectName]['f'][1];

        $factoryMethodArguments = [];
        foreach ($this->objects[$objectName]['fa'] as $index => $argumentInformation) {
            switch ($argumentInformation['t']) {
                case ObjectConfigurationArgument::ARGUMENT_TYPES_SETTING:
                    $factoryMethodArguments[$index] = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $argumentInformation['v']);
                break;
                case ObjectConfigurationArgument::ARGUMENT_TYPES_STRAIGHTVALUE:
                    $factoryMethodArguments[$index] = $argumentInformation['v'];
                break;
                case ObjectConfigurationArgument::ARGUMENT_TYPES_OBJECT:
                    $factoryMethodArguments[$index] = $this->get($argumentInformation['v']);
                break;
            }
        }

        if (count($factoryMethodArguments) === 0) {
            return $factory->$factoryMethodName();
        } else {
            return call_user_func_array([$factory, $factoryMethodName], $factoryMethodArguments);
        }
    }
protected function buildObjectByFactory ( $ objectName ) { $ configurationManager = $ this -> get ( ConfigurationManager :: class ) ; $ factory = $ this -> get ( $ this -> objects [ $ objectName ] [ 'f' ] [ 0 ] ) ; $ factoryMethodName = $ this -> objects [ $ objectName ] [ 'f' ] [ 1 ] ; $ factoryMethodArguments = [ ] ; foreach ( $ this -> objects [ $ objectName ] [ 'fa' ] as $ index => $ argumentInformation ) { switch ( $ argumentInformation [ 't' ] ) { case ObjectConfigurationArgument :: ARGUMENT_TYPES_SETTING : $ factoryMethodArguments [ $ index ] = $ configurationManager -> getConfiguration ( ConfigurationManager :: CONFIGURATION_TYPE_SETTINGS , $ argumentInformation [ 'v' ] ) ; break ; case ObjectConfigurationArgument :: ARGUMENT_TYPES_STRAIGHTVALUE : $ factoryMethodArguments [ $ index ] = $ argumentInformation [ 'v' ] ; break ; case ObjectConfigurationArgument :: ARGUMENT_TYPES_OBJECT : $ factoryMethodArguments [ $ index ] = $ this -> get ( $ argumentInformation [ 'v' ] ) ; break ; } } if ( count ( $ factoryMethodArguments ) === 0 ) { return $ factory -> $ factoryMethodName ( ) ; } else { return call_user_func_array ( [ $ factory , $ factoryMethodName ] , $ factoryMethodArguments ) ; } }
Invokes the Factory defined in the object configuration of the specified object in order
to build an instance. Arguments which were defined in the object configuration are
passed to the factory method.

@param string $objectName Name of the object to build
@return object The built object
Invokes the Factory defined in the object configuration of the specified object in order to build an instance . Arguments which were defined in the object configuration are passed to the factory method .