Пример #1
0
 /**
  * Returns the profiler event object.
  *
  * @return self
  */
 public function getEvent()
 {
     if (!isset($this->event)) {
         $this->event = new ProfilerEvent();
         $this->event->setTarget($this);
         $this->event->setProfiler($this);
     }
     return $this->event;
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function getServiceConfig()
 {
     return array('aliases' => array('JcNavigation\\ReportInterface' => 'JcNavigation\\Report', 'jc_navigation_doctrine_em' => 'Doctrine\\ORM\\EntityManager'), 'invokables' => array('JcNavigation\\Report' => 'JcNavigation\\Report', 'JcNavigation\\EventCollector' => 'JcNavigation\\Collector\\EventCollector', 'JcNavigation\\ExceptionCollector' => 'JcNavigation\\Collector\\ExceptionCollector', 'JcNavigation\\RouteCollector' => 'JcNavigation\\Collector\\RouteCollector', 'JcNavigation\\RequestCollector' => 'JcNavigation\\Collector\\RequestCollector', 'JcNavigation\\ConfigCollector' => 'JcNavigation\\Collector\\ConfigCollector', 'JcNavigation\\MailCollector' => 'JcNavigation\\Collector\\MailCollector', 'JcNavigation\\MemoryCollector' => 'JcNavigation\\Collector\\MemoryCollector', 'JcNavigation\\TimeCollector' => 'JcNavigation\\Collector\\TimeCollector', 'JcNavigation\\FlushListener' => 'JcNavigation\\Listener\\FlushListener', 'JcNavigation\\Collector\\UriCollector' => 'JcNavigation\\Collector\\UriCollector'), 'factories' => array('JcNavigation\\Profiler' => function ($sm) {
         $a = new Profiler($sm->get('JcNavigation\\Report'));
         $a->setEvent($sm->get('JcNavigation\\Event'));
         return $a;
     }, 'JcNavigation\\Config' => function ($sm) {
         $config = $sm->get('Configuration');
         $config = isset($config[__NAMESPACE__]) ? $config[__NAMESPACE__] : null;
         return new Options($config, $sm->get('JcNavigation\\Report'));
     }, 'JcNavigation\\Event' => function ($sm) {
         $event = new ProfilerEvent();
         $event->setReport($sm->get('JcNavigation\\Report'));
         $event->setApplication($sm->get('Application'));
         return $event;
     }, 'JcNavigation\\StorageListener' => function ($sm) {
         return new Listener\StorageListener($sm);
     }, 'JcNavigation\\ToolbarListener' => function ($sm) {
         return new Listener\ToolbarListener($sm->get('ViewRenderer'), $sm->get('JcNavigation\\Config'));
     }, 'JcNavigation\\ProfilerListener' => function ($sm) {
         return new Listener\ProfilerListener($sm, $sm->get('JcNavigation\\Config'));
     }, 'JcNavigation' => 'JcNavigation\\Navigation\\NavigationFactory'));
 }
Пример #3
0
 private function getModules(ProfilerEvent $event)
 {
     if (!($application = $event->getApplication())) {
         return null;
     }
     $serviceManager = $application->getServiceManager();
     /* @var $moduleManager \Zend\ModuleManager\ModuleManagerInterface */
     $moduleManager = $serviceManager->get('ModuleManager');
     return array_keys($moduleManager->getLoadedModules());
 }