메소드 | 설명 | |
---|---|---|
__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 | ||
리턴 | array | An array of aliases |
public getService ( string $id ) : object | ||
$id | string | The service identifier |
리턴 | object | The associated service |
public getServiceIds ( ) : array | ||
리턴 | array | An array of all defined service ids |
public hasService ( string $id ) : boolean | ||
$id | string | The service identifier |
리턴 | 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 |