예제 #1
0
 /**
  * @param FilterControllerEvent $event
  */
 public function onKernelController(FilterControllerEvent $event)
 {
     $request = $event->getRequest();
     $attributes = $request->attributes;
     $this->controller = $event->getController();
     $this->request = $request;
     $vars = $attributes->get($this->varsAttribute, null, true);
     if (empty($vars) || !is_array($vars)) {
         $vars = array();
     }
     $this->variables->replace($vars);
 }
 /**
  * @param array $context
  */
 public function popContext(array &$context)
 {
     $vars = array_pop($this->contextStack);
     $this->variables->replace($vars);
     $context['pmd_frontend'] = $vars;
 }