PHP 클래스 Zend\Mvc\Service\ServiceListenerFactory

상속: implements Zend\ServiceManager\FactoryInterface
파일 보기 프로젝트 열기: zendframework/zend-mvc

보호된 프로퍼티들

프로퍼티 타입 설명
$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