- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Lib\ServiceByTypeDispatcher::__construct |
( |
string | $type, |
|
|
array | $callbacks, |
|
|
object | $defaultService ) |
- Parameters
-
class-string | $type | type of the dispatched services, i.e. type of the default service and the return value of the callbacks |
callable[] | $callbacks | map of entity types to callbacks creating the service to be used |
object | $defaultService | the service to be used when there is no callback defined for the given entity type |
◆ createService()
Wikibase\Lib\ServiceByTypeDispatcher::createService |
( |
string | $entityType, |
|
|
array | $args = [] ) |
|
private |
◆ getServiceForType()
Wikibase\Lib\ServiceByTypeDispatcher::getServiceForType |
( |
string | $entityType, |
|
|
array | $callbackArgs = [] ) |
- Parameters
-
string | $entityType | |
array | $callbackArgs | arguments to be passed to the service creation callback |
- Returns
- object
◆ $callbacks
Wikibase\Lib\ServiceByTypeDispatcher::$callbacks |
|
private |
◆ $defaultService
Wikibase\Lib\ServiceByTypeDispatcher::$defaultService |
|
private |
◆ $services
Wikibase\Lib\ServiceByTypeDispatcher::$services |
|
private |
◆ $type
Wikibase\Lib\ServiceByTypeDispatcher::$type |
|
private |
The documentation for this class was generated from the following file: