Пример #1
0
 /**
  * Set request keys based on values in request object
  *
  * @return void
  */
 protected function _setRequestKeys()
 {
     if (null !== $this->_request) {
         $this->_moduleKey = $this->_request->getModuleKey();
         $this->_controllerKey = $this->_request->getControllerKey();
         $this->_actionKey = $this->_request->getActionKey();
     }
     if (null !== $this->_dispatcher) {
         $this->_defaults += array($this->_controllerKey => $this->_dispatcher->getDefaultControllerName(), $this->_actionKey => $this->_dispatcher->getDefaultAction(), $this->_moduleKey => $this->_dispatcher->getDefaultModule());
     }
     $this->_keysSet = true;
 }
Пример #2
0
 public static function cloneFromDispatcher(Zend_Controller_Dispatcher_Interface $dispatcher)
 {
     $new = new self($dispatcher->getParams());
     $new->setControllerDirectory($dispatcher->getControllerDirectory());
     $new->setDefaultModule($dispatcher->getDefaultModule());
     $new->setDefaultControllerName($dispatcher->getDefaultControllerName());
     $new->setDefaultAction($dispatcher->getDefaultAction());
     $new->setPathDelimiter($dispatcher->getPathDelimiter());
     return $new;
 }