예제 #1
0
 /**
  * @param   AppContextInterface           $context
  * @param   ConsoleViewTemplateInterface  $view
  * @return  mixed   null | AppContextInterface 
  */
 public function process(MvcContextInterface $context)
 {
     $view = $context->getView();
     $params = array('get' => array('label-a' => 'value-a', 'label-b' => 'value-b'));
     $uriB = 'action-b/label-a/value-a/label-b/value-b';
     $uriC = 'action-c/label-c/value-c/label-d/value-d';
     $strategy = $context->getStrategy();
     $contextB = $this->callUri($uriB, $strategy);
     $contextC = $this->callUri($uriC, $strategy);
     $results = $contextB->buildView() . ' and ' . $contextC->buildView();
     $view->assign('results', $results);
 }
예제 #2
0
 /**
  * @param   AppContextInterface           $context
  * @param   ConsoleViewTemplateInterface  $view
  * @return  mixed   null | AppContextInterface 
  */
 public function process(MvcContextInterface $context)
 {
     $strategy = $context->getStrategy();
     $view = $context->getView();
     $view->assign('common-a', 'value-a')->assign('common-b', 'value-b');
     switch ($strategy) {
         case 'console':
             $label = 'console-foo';
             break;
         case 'ajax':
             $label = 'ajax-foo';
             break;
         case 'html':
             $label = 'html-foo';
             break;
     }
     $view->assign($label, 'bar');
 }