Class ServiceRegistry
Utility class to run async job services.
Methods summary
public static
BEdita\Core\Job\JobService
|
#
get( string $name )
Get a service class instance for a given name.
Get a service class instance for a given name.
If no service with supplied name was registered a corresponding class in plugins and core in 'Service' namespace
is searched.
Example:
- service $name = 'example', look for class \MyPlugin\Service\Example and then for \BEdita\Core\Service\Example
Parameters
- $name
- The service name you want to get.
Returns
Throws
LogicException Throws an exception if no suitable class for that service could be found.
|
public static
|
#
set( string $name, BEdita\Core\Job\JobService $instance )
Set service class instance for a service.
Set service class instance for a service.
Parameters
- $name
- The service name you want to register.
- $instance
- The instance object to be registered.
|
public static
|
#
reset( )
Reset registered service instances
Reset registered service instances
|