当前位置: 首页>>代码示例>>PHP>>正文


PHP ModuleManagerInterface::getEvent方法代码示例

本文整理汇总了PHP中Zend\ModuleManager\ModuleManagerInterface::getEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleManagerInterface::getEvent方法的具体用法?PHP ModuleManagerInterface::getEvent怎么用?PHP ModuleManagerInterface::getEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend\ModuleManager\ModuleManagerInterface的用法示例。


在下文中一共展示了ModuleManagerInterface::getEvent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 /**
  * Init
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     // get service manager
     $this->serviceLocator = $moduleManager->getEvent()->getParam('ServiceManager');
     $moduleManager->getEventManager()->attach(ModuleEvent::EVENT_LOAD_MODULES_POST, [$this, 'initApplication']);
     $eventManager = AclEvent::getEventManager();
     $eventManager->attach(AclEvent::DELETE_ROLE, function ($e) use($moduleManager) {
         $userModel = $moduleManager->getEvent()->getParam('ServiceManager')->get('Application\\Model\\ModelManager')->getInstance('User\\Model\\UserBase');
         // change the empty role with the default role
         $userModel->updateUsersWithEmptyRoles(AclBaseModel::DEFAULT_ROLE_MEMBER);
     }, -100);
 }
开发者ID:spooner77,项目名称:dream-cms,代码行数:15,代码来源:Module.php

示例2: init

 /**
  * @param ModuleManagerInterface $moduleManager
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     $moduleManager->loadModule('AssetManager');
     $sm = $moduleManager->getEvent()->getParam('ServiceManager');
     $serviceListener = $sm->get('ServiceListener');
     $serviceListener->addServiceManager('JQueryPluginManager', 'jquery_plugins', JQueryPluginProviderInterface::class, 'getJQueryPluginConfig');
 }
开发者ID:coolms,项目名称:jquery,代码行数:10,代码来源:Module.php

示例3: init

 /**
  * {@inheritdoc}
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     /** @var ServiceManager $serviceManager */
     $serviceManager = $moduleManager->getEvent()->getParam('ServiceManager');
     /** @var ServiceListenerInterface $serviceListener */
     $serviceListener = $serviceManager->get('ServiceListener');
     $serviceListener->addServiceManager(DataMapper\Manager\DataMapperManager::class, 'thorr_persistence_dmm', DataMapper\Manager\DataMapperManagerConfigProviderInterface::class, 'getDataMapperManagerConfig');
 }
开发者ID:stefanotorresi,项目名称:thorr-persistence,代码行数:11,代码来源:Module.php

示例4: init

 /**
  * Initialize workflow
  *
  * @param  ModuleManagerInterface $manager
  * @return void
  */
 public function init(ModuleManagerInterface $manager)
 {
     $this->moduleManager = $manager;
     $this->serviceLocator = $manager->getEvent()->getParam('ServiceManager');
     $shared = $manager->getEventManager()->getSharedManager();
     $shared->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array(new InjectTemplateListener(), 'injectTemplate'), -85);
     $shared->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($this, 'onDispatch'), 100);
 }
开发者ID:gridguyz,项目名称:core,代码行数:14,代码来源:Module.php

示例5: init

 /**
  * {@inheritDoc}
  */
 public function init(ModuleManagerInterface $manager)
 {
     $events = $manager->getEventManager();
     // Initialize logger collector once the profiler is initialized itself
     $events->attach('profiler_init', function (EventInterface $e) use($manager) {
         $manager->getEvent()->getParam('ServiceManager')->get('doctrine.couch_logger_collector.odm_default');
     });
 }
开发者ID:Ellipizle,项目名称:DoctrineCouchODMModule,代码行数:11,代码来源:Module.php

示例6: init

 public function init(ModuleManagerInterface $moduleManager)
 {
     /** @var ServiceListener $serviceListener */
     $serviceListener = $moduleManager->getEvent()->getParam('ServiceManager')->get('ServiceListener');
     $serviceListener->addServiceManager(AuthorizationConditionPluginManager::class, 'zource_conditions', '', '');
     $serviceListener->addServiceManager(UiNavigationItemPluginManager::class, 'zource_ui_nav_items', '', '');
     $this->initializeErrorLogging();
 }
开发者ID:zource,项目名称:zource,代码行数:8,代码来源:Module.php

示例7: init

 /**
  * Init
  *
  * @param \Zend\ModuleManager\ModuleManagerInterface
  * @return void
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     // get the service manager
     $this->serviceLocator = $moduleManager->getEvent()->getParam('ServiceManager');
     // get the module manager
     $this->moduleManager = $moduleManager;
     $moduleManager->getEventManager()->attach(ModuleEvent::EVENT_LOAD_MODULES_POST, [$this, 'initApplication']);
 }
开发者ID:esase,项目名称:dream-cms,代码行数:14,代码来源:Module.php

示例8: init

 public function init(ModuleManagerInterface $manager)
 {
     $events = $manager->getEventManager();
     // Initialize logger collector once the profiler is initialized itself
     $events->attach('profiler_init', function () use($manager) {
         $manager->getEvent()->getParam('ServiceManager')->get('doctrine.sql_logger_collector.orm_another');
         // moduificare nome
     });
 }
开发者ID:89snake89,项目名称:PHPTest,代码行数:9,代码来源:Module.php

示例9: init

 /**
  * {@inheritDoc}
  */
 public function init(ModuleManagerInterface $manager)
 {
     $events = $manager->getEventManager();
     // Initialize logger collector once the profiler is initialized itself
     $events->attach('profiler_init', function () use($manager) {
         $manager->getEvent()->getParam('ServiceManager')->get('doctrine.sql_logger_collector.orm_default');
     });
     $events->getSharedManager()->attach('doctrine', 'loadCli.post', array($this, 'initializeConsole'));
 }
开发者ID:oscar121,项目名称:doggerout,代码行数:12,代码来源:Module.php

示例10: init

 /**
  * init
  *
  * Initialise the modules services.
  *
  * @param ModuleManagerInterface $moduleManager
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     /**
      * @var ModuleManager $moduleManager
      * @var ServiceManager $serviceManager
      * @var ServiceListener $serviceListener
      */
     $serviceManager = $moduleManager->getEvent()->getParam('ServiceManager');
     $serviceListener = $serviceManager->get('ServiceListener');
     $serviceListener->addServiceManager('EntityServiceManager', 'entity_service_manager', EntityServiceProviderInterface::class, 'getEntityServiceConfig');
 }
开发者ID:alex-patterson-webdev,项目名称:arp-entity-service,代码行数:18,代码来源:Module.php

示例11: deleteUserMembershipLevels

 /**
  * Delete user's membership levels +
  *
  * @param \Zend\ModuleManager\ModuleManagerInterface $moduleManager
  * @param integer $userId
  * @return void
  */
 protected function deleteUserMembershipLevels(ModuleManagerInterface $moduleManager, $userId)
 {
     $model = $moduleManager->getEvent()->getParam('ServiceManager')->get('Application\\Model\\ModelManager')->getInstance('Membership\\Model\\MembershipBase');
     // delete all user's connections
     if (null != ($connections = $model->getAllUserMembershipConnections($userId))) {
         foreach ($connections as $connection) {
             // delete the connection
             if (false === ($deleteResult = $model->deleteMembershipConnection($connection->id))) {
                 break;
             }
         }
     }
 }
开发者ID:esase,项目名称:dream-cms-membership-module,代码行数:20,代码来源:Module.php

示例12: init

 /**
  * {@inheritDoc}
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     if (class_exists('ZendDeveloperTools\\Module')) {
         $moduleManager->loadModule('ZendDeveloperTools');
     }
     $moduleManager->loadModule('OcraCachedViewResolver');
     $moduleManager->loadModule('StrokerCache');
     $moduleManager->loadModule('CmsJquery');
     $sm = $moduleManager->getEvent()->getParam('ServiceManager');
     $serviceListener = $sm->get('ServiceListener');
     $serviceListener->addServiceManager('MapperManager', 'mappers', MapperPluginProviderInterface::class, 'getMapperConfig');
     $serviceListener->addServiceManager('DomainServiceManager', 'domain_services', DomainServicePluginProviderInterface::class, 'getDomainServiceConfig');
     $serviceListener->addServiceManager('SessionContainerManager', 'session_containers', ContainerPluginProviderInterface::class, 'getSessionContainerConfig');
 }
开发者ID:coolms,项目名称:common,代码行数:17,代码来源:Module.php

示例13: init

 /**
  * init
  *
  * @param \Zend\ModuleManager\ModuleManagerInterface $moduleManager
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     $serviceManager = $moduleManager->getEvent()->getParam('ServiceManager');
     $serviceListener = $serviceManager->get('ServiceListener');
     $serviceListener->addServiceManager('EntityRepositoryManager', 'entity_repository_manager', 'ArpEntityRepository\\ModuleManager\\Feature\\EntityRepositoryProviderInterface', 'getEntityRepositoryConfig');
 }
开发者ID:alex-patterson-webdev,项目名称:arp-entity-repository,代码行数:11,代码来源:Module.php

示例14: init

 /**
  * Initialize workflow
  *
  * @param  ModuleManagerInterface $moduleManager
  *
  * @return void
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     $serviceManager = $moduleManager->getEvent()->getParam('ServiceManager');
     $serviceListener = $serviceManager->get('ServiceListener');
     $serviceListener->addServiceManager('Phpro\\MailManager\\PluginManager', 'mail_manager', 'Phpro\\MailManager\\Mail\\MailInterface', 'getMailManagerConfig');
 }
开发者ID:phpro,项目名称:zf-mail-manager,代码行数:13,代码来源:Module.php

示例15: init

 /**
  *
  * @param ModuleManagerInterface $manager
  */
 public function init(ModuleManagerInterface $manager)
 {
     $sm = $manager->getEvent()->getParam('ServiceManager');
     $serviceListener = $sm->get('ServiceListener');
     $serviceListener->addServiceManager('BlockManager', 'blocks', 'ConLayout\\ModuleManager\\Feature\\BlockProviderInterface', 'getBlockConfig');
 }
开发者ID:adamdyson,项目名称:ConLayout,代码行数:10,代码来源:Module.php


注:本文中的Zend\ModuleManager\ModuleManagerInterface::getEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。