本文整理匯總了PHP中Zend\ModuleManager\ModuleManager::getEvent方法的典型用法代碼示例。如果您正苦於以下問題:PHP ModuleManager::getEvent方法的具體用法?PHP ModuleManager::getEvent怎麽用?PHP ModuleManager::getEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend\ModuleManager\ModuleManager
的用法示例。
在下文中一共展示了ModuleManager::getEvent方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
/**
* Register a specification for the TranslatorPluginManager with the ServiceListener.
*
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @return void
*/
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');
$serviceListener->addServiceManager('TranslatorPluginManager', 'translator_plugins', 'Zend\\ModuleManager\\Feature\\TranslatorPluginProviderInterface', 'getTranslatorPluginConfig');
}
示例2: init
public function init(ModuleManager $moduleManager)
{
$serviceManager = $moduleManager->getEvent()->getParam('ServiceManager');
$serviceListener = $serviceManager->get('ServiceListener');
$serviceListener->addServiceManager('ZF\\Doctrine\\ORM\\QueryBuilder\\Filter\\Service\\FilterManager', 'zf-doctrine-orm-querybuilder-filter', 'ZF\\Doctrine\\QueryBuilder\\Filter\\FilterInterface', 'getDoctrineORMQueryBuilderFilterConfig');
$serviceListener->addServiceManager('ZF\\Doctrine\\ORM\\QueryBuilder\\OrderBy\\Service\\OrderByManager', 'zf-doctrine-orm-querybuilder-orderby', 'ZF\\Doctrine\\QueryBuilder\\OrderBy\\OrderByInterface', 'getDoctrineORMQueryBuilderOrderByConfig');
}
示例3: init
/**
* Register a specification for the HydratorManager with the ServiceListener.
*
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @return void
*/
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');
$serviceListener->addServiceManager('HydratorManager', 'hydrators', 'Zend\\ModuleManager\\Feature\\HydratorProviderInterface', 'getHydratorConfig');
}
示例4: init
public function init(ModuleManager $moduleManager)
{
$sm = $moduleManager->getEvent()->getParam('ServiceManager');
/* @var $serviceListener \Zend\ModuleManager\Listener\ServiceListener */
$serviceListener = $sm->get('ServiceListener');
$serviceListener->addServiceManager('FormatterManager', 'formatter_manager', 'Formatter\\FormatterManager\\FormatterManager', 'getFormatterPluginConfig');
}
示例5: init
/**
* Register a specification for the InputFilterManager with the ServiceListener.
*
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @return void
*/
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');
$serviceListener->addServiceManager('InputFilterManager', 'input_filters', 'Zend\\ModuleManager\\Feature\\InputFilterProviderInterface', 'getInputFilterConfig');
}
示例6: init
/**
* Module init
*
* @param ModuleManager $moduleManager
*/
public function init(ModuleManager $moduleManager)
{
$sm = $moduleManager->getEvent()->getParam('ServiceManager');
$serviceListener = $sm->get('ServiceListener');
$serviceListener->addServiceManager('ZfApigilityDoctrineQueryProviderManager', 'zf-apigility-doctrine-query-provider', 'ZF\\Apigility\\Doctrine\\Server\\Query\\Provider\\QueryProviderInterface', 'getZfApigilityDoctrineQueryProviderConfig');
$serviceListener->addServiceManager('ZfApigilityDoctrineQueryCreateFilterManager', 'zf-apigility-doctrine-query-create-filter', 'ZF\\Apigility\\Doctrine\\Server\\Query\\CreateFilter\\QueryCreateFilterInterface', 'getZfApigilityDoctrineQueryCreateFilterConfig');
}
示例7: init
/**
* Register a specification for the FormElementManager with the ServiceListener.
*
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @return void
*/
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');
$serviceListener->addServiceManager('FormElementManager', 'form_elements', 'Zend\\ModuleManager\\Feature\\FormElementProviderInterface', 'getFormElementConfig');
}
示例8: init
/**
* Register a specification for the ValidatorManager with the ServiceListener.
*
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @return void
*/
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');
$serviceListener->addServiceManager('ValidatorManager', 'validators', ValidatorProviderInterface::class, 'getValidatorConfig');
}
示例9: init
public function init(ModuleManager $moduleManager)
{
$serviceManager = $moduleManager->getEvent()->getParam('ServiceManager');
if ($serviceManager->has('ServiceListener')) {
$serviceListener = $serviceManager->get('ServiceListener');
$serviceListener->addServiceManager('BlockManager', 'block_manager', 'BlockManager\\BlockConfigProviderInterface', 'getBlockConfig');
}
}
示例10: it_should_add_the_mailmanager_as_service_plugin_manager
/**
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @param \Zend\ModuleManager\ModuleEvent $event
* @param \Zend\ServiceManager\ServiceManager $serviceManager
* @param \Zend\ModuleManager\Listener\ServiceListenerInterface $serviceListener
*/
public function it_should_add_the_mailmanager_as_service_plugin_manager($moduleManager, $event, $serviceManager, $serviceListener)
{
$moduleManager->getEvent()->willReturn($event);
$event->getParam('ServiceManager')->willReturn($serviceManager);
$serviceManager->get('ServiceListener')->willReturn($serviceListener);
$serviceListener->addServiceManager('Phpro\\MailManager\\PluginManager', Argument::cetera())->shouldBeCalled();
$this->init($moduleManager);
}
示例11: init
public function init(ModuleManager $moduleManager)
{
$serviceManager = $moduleManager->getEvent()->getParam('ServiceManager');
/** @var ServiceListener $serviceListener */
$serviceListener = $serviceManager->get('ServiceListener');
$serviceListener->addServiceManager('ZfDoctrineQueryBuilderFilterManagerOrm', 'zf-doctrine-querybuilder-filter-orm', Filter\FilterInterface::class, 'getDoctrineQueryBuilderFilterOrmConfig');
$serviceListener->addServiceManager('ZfDoctrineQueryBuilderFilterManagerOdm', 'zf-doctrine-querybuilder-filter-odm', Filter\FilterInterface::class, 'getDoctrineQueryBuilderFilterOdmConfig');
$serviceListener->addServiceManager('ZfDoctrineQueryBuilderOrderByManagerOrm', 'zf-doctrine-querybuilder-orderby-orm', OrderBy\OrderByInterface::class, 'getDoctrineQueryBuilderOrderByOrmConfig');
$serviceListener->addServiceManager('ZfDoctrineQueryBuilderOrderByManagerOdm', 'zf-doctrine-querybuilder-orderby-odm', OrderBy\OrderByInterface::class, 'getDoctrineQueryBuilderOrderByOdmConfig');
}
示例12: init
/**
* Register specifications for all zend-log plugin managers with the ServiceListener.
*
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @return void
*/
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');
$serviceListener->addServiceManager('LogProcessorManager', 'log_processors', 'Zend\\ModuleManager\\Feature\\LogProcessorProviderInterface', 'getLogProcessorConfig');
$serviceListener->addServiceManager('LogWriterManager', 'log_writers', 'Zend\\ModuleManager\\Feature\\LogWriterProviderInterface', 'getLogWriterConfig');
$serviceListener->addServiceManager('LogFilterManager', 'log_filters', 'Zend\\Log\\Filter\\LogFilterProviderInterface', 'getLogFilterConfig');
$serviceListener->addServiceManager('LogFormatterManager', 'log_formatters', 'Zend\\Log\\Filter\\LogFormatterProviderInterface', 'getLogFormatterConfig');
}
示例13: init
/**
* @param ModuleManager $moduleManager
*/
public function init(ModuleManager $moduleManager)
{
/* @var $sm \Zend\ServiceManager\ServiceManager */
$sm = $moduleManager->getEvent()->getParam('ServiceManager');
$serviceListener = $sm->get('ServiceListener');
$events = $moduleManager->getEventManager();
$serviceListener->addServiceManager('UthandoMapperManager', 'uthando_mappers', 'UthandoCommon\\Mapper\\MapperInterface', 'getUthandoMapperConfig');
$serviceListener->addServiceManager('UthandoModelManager', 'uthando_models', 'UthandoCommon\\Model\\ModelInterface', 'getUthandoModelConfig');
$serviceListener->addServiceManager('UthandoServiceManager', 'uthando_services', 'UthandoCommon\\Service\\ServiceInterface', 'getUthandoServiceConfig');
$events->attach(new ConfigListener());
}
示例14: init
/**
* @param ModuleManager $moduleManager
* @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
*/
public function init(ModuleManager $moduleManager)
{
$moduleEvent = $moduleManager->getEvent();
/** @var ServiceLocatorInterface $serviceLocator */
$serviceLocator = $moduleEvent->getParam('ServiceManager');
/** @var ServiceListenerInterface $serviceListener */
$serviceListener = $serviceLocator->get('ServiceListener');
// Register EventManagers plugin manager.
static::registerPluginManager($serviceListener);
// Register ListenerAggregates plugin manager.
static::registerListenerAggregatesPluginManager($serviceListener);
}
示例15: init
public function init(ModuleManager $moduleManager)
{
$sm = $moduleManager->getEvent()->getParam('ServiceManager');
$serviceListener = $sm->get('ServiceListener');
$serviceListener->addServiceManager('BlockPluginManager', 'block_plugins', 'Agere\\Block\\Service\\Plugin\\BlockPluginProviderInterface', 'getBlockPluginConfig');
}