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


PHP ModuleEvent::getParam方法代码示例

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


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

示例1: initEvents

 /**
  * Init events
  * 
  * @param \Zend\ModuleManager\ModuleEvent $e
  */
 public function initEvents(ModuleEvent $e)
 {
     $model = $this->serviceLocator->get('Application\\Model\\ModelManager')->getInstance('ActionTracker\\Model\\ActionTrackerBase');
     $actions = $model->getActivatedActions();
     // bind all activated events
     if (count($actions)) {
         $eventManager = ActionTrackerEvent::getEventManager();
         foreach ($actions as $action) {
             $eventManager->attach($action->name, function ($e) use($model, $action) {
                 if ($model->getModuleInfo('ActionTracker')) {
                     $model->logAction($action->action_id, $e->getParam('description'), $e->getParam('description_params'));
                 }
             });
         }
     }
 }
开发者ID:esase,项目名称:dream-cms-action-tracker-module,代码行数:21,代码来源:Module.php

示例2: onLoadModulesPost

 /**
  * Called when the modules are loaded.
  *
  * @param ModuleEvent $event
  */
 public function onLoadModulesPost(ModuleEvent $event)
 {
     /** @var ServiceManager $serviceManager */
     $serviceManager = $event->getParam('ServiceManager');
     /** @var EngineInterface $engine */
     $engine = $serviceManager->get('phpab.engine');
     $engine->start();
 }
开发者ID:phpab,项目名称:phpab-module,代码行数:13,代码来源:Module.php

示例3: onLoadModules

 public function onLoadModules(ModuleEvent $event)
 {
     //        /** @var ModuleManager $moduleManager */
     //        $moduleManager = $event->getTarget();
     /** @var ServiceManager $serviceLocator */
     $serviceLocator = $event->getParam('ServiceManager');
     $serviceConfig = ArrayUtils::merge($this->getConfig(false)['service_manager'], $this->getServiceConfig());
     $serviceConfig = new ServiceConfig($serviceConfig);
     $serviceConfig->configureServiceManager($serviceLocator);
     /** @var \Detail\VarCrypt\Listener\MultiEncryptorListener $encryptorListener */
     $encryptorListener = $serviceLocator->get('Detail\\VarCrypt\\Listener\\MultiEncryptorListener');
     $encryptorListener->onLoadModules($event);
     //        $moduleManager->getEventManager()->attachAggregate($encryptorListener);
 }
开发者ID:detailnet,项目名称:dfw-varcrypt-module,代码行数:14,代码来源:Module.php

示例4: overrideViewHelperUrl

 public function overrideViewHelperUrl(ModuleEvent $e)
 {
     $serviceLocator = $e->getParam('ServiceManager');
     $viewHelperManager = $serviceLocator->get('ViewHelperManager');
     // Configure URL view helper with router
     $viewHelperManager->setFactory('url', function ($sm) use($serviceLocator) {
         $helper = new View\Helper\Url();
         $router = \Zend\Console\Console::isConsole() ? 'HttpRouter' : 'Router';
         $helper->setRouter($serviceLocator->get($router));
         $match = $serviceLocator->get('application')->getMvcEvent()->getRouteMatch();
         if ($match instanceof \Zend\Mvc\Router\RouteMatch) {
             $helper->setRouteMatch($match);
         }
         return $helper;
     });
 }
开发者ID:joacub,项目名称:libra-locale,代码行数:16,代码来源:Module.php

示例5: onLoadModule

 /**
  * Merge the config for each module
  *
  * @param  ModuleEvent $e
  * @return ConfigListener
  */
 public function onLoadModule(ModuleEvent $e)
 {
     $module = $e->getParam('module');
     if (!$module instanceof ConfigProviderInterface && !is_callable(array($module, 'getConfig'))) {
         return $this;
     }
     $config = $module->getConfig();
     $this->addConfig($e->getModuleName(), $config);
     return $this;
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:16,代码来源:ConfigListener.php


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