當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。