Method | Description | |
---|---|---|
__construct ( array $options = [] ) | Construct object. | |
getAliases ( ) : array | Gets all defined aliases. | |
getService ( string $id ) : object | Gets a service. | |
getServiceIds ( ) : array | Gets all service ids. | |
hasService ( string $id ) : boolean | Returns true if the given service is defined. | |
register ( string $id, string $class = null ) | Registers a service definition. | |
setAlias ( string $alias, mixed $id ) | Sets an alias for an existing service. | |
setService ( string $id, object $service ) | Sets a service. |
public __construct ( array $options = [] ) | ||
$options | array | The default options |
public getAliases ( ) : array | ||
return | array | An array of aliases |
public getService ( string $id ) : object | ||
$id | string | The service identifier |
return | object | The associated service |
public getServiceIds ( ) : array | ||
return | array | An array of all defined service ids |
public hasService ( string $id ) : boolean | ||
$id | string | The service identifier |
return | boolean | True if the service is defined, false otherwise |
public setService ( string $id, object $service ) | ||
$id | string | The service identifier |
$service | object | The service instance |