PHP Class Elgg\Di\ServiceProvider

We extend the container because it allows us to document properties in the PhpDoc, which assists IDEs to auto-complete properties and understand the types returned. Extension allows us to keep the container generic.
Inheritance: extends Elgg\Di\DiContainer
显示文件 Open project: elgg/elgg Class Usage Examples

Public Methods

Method Description
__construct ( Config $config ) Constructor

Protected Methods

Method Description
resolveLoggerDependencies ( string $service_needed ) : mixed Returns the first requested service of the logger, events, and hooks. It sets the hooks and events up in the right order to prevent circular dependency.

Method Details

__construct() public method

Constructor
public __construct ( Config $config )
$config Elgg\Config Elgg Config service

resolveLoggerDependencies() protected method

Returns the first requested service of the logger, events, and hooks. It sets the hooks and events up in the right order to prevent circular dependency.
protected resolveLoggerDependencies ( string $service_needed ) : mixed
$service_needed string The service requested first
return mixed