當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ModuleManager::getEvent方法代碼示例

本文整理匯總了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');
 }
開發者ID:froschdesign,項目名稱:zend-i18n,代碼行數:13,代碼來源:Module.php

示例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');
 }
開發者ID:api-skeletons,項目名稱:zf-doctrine-orm-querybuilder,代碼行數:7,代碼來源:Module.php

示例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');
 }
開發者ID:localheinz,項目名稱:zend-hydrator,代碼行數:13,代碼來源:Module.php

示例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');
 }
開發者ID:gianarb,項目名稱:zf2-formatter,代碼行數:7,代碼來源:Module.php

示例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');
 }
開發者ID:zendframework,項目名稱:zend-inputfilter,代碼行數:13,代碼來源:Module.php

示例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');
 }
開發者ID:API-Skeletons,項目名稱:zf-apigility-doctrine,代碼行數:12,代碼來源:Module.php

示例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');
 }
開發者ID:zendframework,項目名稱:zend-form,代碼行數:13,代碼來源:Module.php

示例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');
 }
開發者ID:adrenth,項目名稱:rssfetcher,代碼行數:13,代碼來源:Module.php

示例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');
     }
 }
開發者ID:labofidea,項目名稱:block-manager,代碼行數:8,代碼來源:Module.php

示例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);
 }
開發者ID:phpro,項目名稱:zf-mail-manager,代碼行數:14,代碼來源:ModuleSpec.php

示例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');
 }
開發者ID:zfcampus,項目名稱:zf-doctrine-querybuilder,代碼行數:10,代碼來源:Module.php

示例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');
 }
開發者ID:zendframework,項目名稱:zend-log,代碼行數:16,代碼來源:Module.php

示例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());
 }
開發者ID:uthando-cms,項目名稱:uthando-common,代碼行數:14,代碼來源:Module.php

示例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);
 }
開發者ID:abacaphiliac,項目名稱:zend-eventmanager-pluginmanager,代碼行數:16,代碼來源:Module.php

示例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');
 }
開發者ID:agerecompany,項目名稱:zfc-block,代碼行數:6,代碼來源:Module.php


注:本文中的Zend\ModuleManager\ModuleManager::getEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。