PHP Класс Zend\Mvc\Service\ServiceListenerFactory

Наследование: implements Zend\ServiceManager\FactoryInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$defaultServiceConfig array Default mvc-related service configuration -- can be overridden by modules.

Открытые методы

Метод Описание
__construct ( ) Constructor
__invoke ( Interop\Container\ContainerInterface $container, $requestedName, array $options = null ) : Zend\ModuleManager\Listener\ServiceListenerInterface Create the service listener service
createService ( Zend\ServiceManager\ServiceLocatorInterface $container ) : Zend\ModuleManager\Listener\ServiceListenerInterface Create and return the ServiceListener (v2)

Приватные методы

Метод Описание
injectServiceListenerOptions ( array $options, Zend\ModuleManager\Listener\ServiceListenerInterface $serviceListener ) Validate and inject plugin manager options into the service listener.
injectV3Aliases ( ) : void Inject additional aliases for zend-servicemanager v3 usage
validatePluginManagerOptions ( array $options, string $name ) Validate the structure and types for plugin manager configuration options.

Описание методов

__construct() публичный Метод

When executed under zend-servicemanager v3, injects additional aliases to ensure backwards compatibility.
public __construct ( )

__invoke() публичный Метод

Tries to get a service named ServiceListenerInterface from the service locator, otherwise creates a ServiceListener instance, passing it the container instance and the default service configuration, which can be overridden by modules. It looks for the 'service_listener_options' key in the application config and tries to add service/plugin managers as configured. The value of 'service_listener_options' must be a list (array) which contains the following keys: - service_manager: the name of the service manage to create as string - config_key: the name of the configuration key to search for as string - interface: the name of the interface that modules can implement as string - method: the name of the method that modules have to implement as string
public __invoke ( Interop\Container\ContainerInterface $container, $requestedName, array $options = null ) : Zend\ModuleManager\Listener\ServiceListenerInterface
$container Interop\Container\ContainerInterface
$options array
Результат Zend\ModuleManager\Listener\ServiceListenerInterface

createService() публичный Метод

Create and return the ServiceListener (v2)
public createService ( Zend\ServiceManager\ServiceLocatorInterface $container ) : Zend\ModuleManager\Listener\ServiceListenerInterface
$container Zend\ServiceManager\ServiceLocatorInterface
Результат Zend\ModuleManager\Listener\ServiceListenerInterface

Описание свойств

$defaultServiceConfig защищенное свойство

Default mvc-related service configuration -- can be overridden by modules.
protected array $defaultServiceConfig
Результат array