Set allow override
Parameters: | $allowOverride – |
---|---|
Return type: | ServiceManager |
Set throw exceptions in create
Parameters: | bool – |
---|---|
Return type: | ServiceManager |
Get throw exceptions in create
Return type: | bool |
---|
Set flag indicating whether to pull from peering manager before attempting creation
Parameters: | bool – |
---|---|
Return type: | ServiceManager |
Should we retrieve from the peering manager prior to attempting to create a service?
Return type: | bool |
---|
Set invokable class
Parameters: |
|
---|---|
Return type: | ServiceManager |
Throws : | ExceptionInvalidServiceNameException |
Set factory
Parameters: |
|
---|---|
Return type: | ServiceManager |
Throws : | ExceptionInvalidArgumentException |
Throws : | ExceptionInvalidServiceNameException |
Add abstract factory
Parameters: |
|
---|---|
Return type: | ServiceManager |
Throws : | ExceptionInvalidArgumentException if the abstract factory is invalid |
Add initializer
Parameters: |
|
---|---|
Return type: | ServiceManager |
Throws : | ExceptionInvalidArgumentException |
Register a service with the locator
Parameters: |
|
---|---|
Return type: | ServiceManager |
Throws : | ExceptionInvalidServiceNameException |
Retrieve a registered instance
Parameters: |
|
---|---|
Throws ExceptionServiceNotFoundException: | |
Return type: | object|array |
Create an instance
Parameters: | string|array – |
---|---|
Return type: | bool|object |
Throws : | ExceptionServiceNotFoundException |
Throws : | ExceptionServiceNotCreatedException |
Determine if we can create an instance.
Parameters: |
|
---|---|
Return type: | bool |
@param string|array $name
Parameters: |
|
---|---|
Return type: | bool |
Determine if we can create an instance from an abstract factory.
Parameters: |
|
---|---|
Return type: | bool |
@param string $alias
Parameters: | string – |
---|---|
Return type: | ServiceManager |
Throws : | ExceptionServiceNotFoundException |
Throws : | ExceptionInvalidServiceNameException |
Determine if we have an alias
Parameters: | string – |
---|---|
Return type: | bool |
Create scoped service manager
Parameters: | string – |
---|---|
Return type: | ServiceManager |
Add a peering relationship
Parameters: |
|
---|---|
Return type: | ServiceManager |
Canonicalize name
Parameters: | string – |
---|---|
Return type: | string |
Create service via callback
Parameters: |
|
---|---|
Throws ExceptionServiceNotCreatedException: | |
Throws ExceptionServiceNotFoundException: | |
Throws ExceptionCircularDependencyFoundException: | |
Return type: | object |
Retrieve a keyed list of all registered services. Handy for debugging!
Return type: | array |
---|
Retrieve a keyed list of all canonical names. Handy for debugging!
Return type: | array |
---|
Allows to override the canonical names lookup map with predefined values.
Parameters: | array – |
---|---|
Return type: | ServiceManager |
Attempt to retrieve an instance via a peering manager
Parameters: | string – |
---|---|
Return type: | mixed |
Attempt to create an instance via an invokable class
Parameters: |
|
---|---|
Return type: | null|stdClass |
Throws : | ExceptionServiceNotFoundException If resolved class does not exist |
Attempt to create an instance via a factory
Parameters: |
|
---|---|
Return type: | mixed |
Throws : | ExceptionServiceNotCreatedException If factory is not callable |
Attempt to create an instance via an abstract factory
Parameters: |
|
---|---|
Return type: | object|null |
Throws : | ExceptionServiceNotCreatedException If abstract factory is not callable |
Checks if the object has this class as one of its parents
Parameters: |
|
---|---|
Return type: | bool |
Unregister a service
Called when $allowOverride is true and we detect that a service being added to the instance already exists. This will remove the duplicate entry, and also any shared flags previously registered.
Parameters: | string – |
---|---|
Return type: | void |