PHP Class Webiny\Component\ServiceManager\ConfigCompiler

Inheritance: use trait Webiny\Component\StdLib\StdLibTrait
Show file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
__construct ( string $serviceName, ConfigObject $config, array $parameters )
compile ( ) : ServiceConfig Compile current config and return a valid ServiceConfig object.

Private Methods

Method Description
buildArguments ( string $key ) Convert simple config arguments into Argument objects
buildCallsArguments ( ) Build arguments for "Calls" methods
buildFactoryArgument ( ) Convert factory service arguments into FactoryArgument objects
buildServiceConfig ( ) : ServiceConfig Build final ServiceConfig object
extendConfig ( ArrayObject $config, ArrayObject $parentConfig ) : ArrayObject Extend $config with $parentConfig
insertParameters ( ArrayObject $config ) : ArrayObject Insert parameters into the config
manageInheritance ( ) Check if current service has a parent service and merge its config with parent service config.

Method Details

__construct() public method

public __construct ( string $serviceName, ConfigObject $config, array $parameters )
$serviceName string Service name
$config Webiny\Component\Config\ConfigObject ConfigObject to compile
$parameters array Parameters to use when parsing $config

compile() public method

That new ServiceConfig will be used to instantiate a service later in the process of creating a service instance.
public compile ( ) : ServiceConfig
return ServiceConfig