コード例 #1
0
ファイル: abstract.php プロジェクト: walteraries/anahita
 /**
  * Set the request of the response
  * 
  * (non-PHPdoc)
  * @see LibBaseControllerAbstract::getResponse()
  */
 public function getResponse()
 {
     if (!$this->_response instanceof LibBaseDispatcherResponse) {
         $this->_response = parent::getResponse();
         if (!$this->_response instanceof LibBaseDispatcherResponse) {
             throw new InvalidArgumentException('Response: ' . get_class($this->_response) . ' must be an intance of LibBaseDispatcherResponse');
         }
         $this->_response->setRequest($this->getRequest());
     }
     return $this->_response;
 }
コード例 #2
0
ファイル: resource.php プロジェクト: stonyyi/anahita
 /**
  * Get a toolbar by identifier.
  *
  * @return KControllerToolbarAbstract
  */
 public function getToolbar($toolbar, $config = array())
 {
     if (is_string($toolbar)) {
         if (strpos($toolbar, '.') === false) {
             $identifier = clone $this->getIdentifier();
             $identifier->path = array('controller', 'toolbar');
             $identifier->name = $toolbar;
             register_default(array('identifier' => $identifier, 'prefix' => $this));
             $toolbar = $identifier;
         }
     }
     return parent::getToolbar($toolbar, $config);
 }