Example #1
0
 /**
  * Executes method.
  * @return mixed
  * @throws RestException
  */
 public function processMethodRequest()
 {
     try {
         $binder = new Engine\Binder($this, $this->methodName, array($this->params));
         return $binder->invoke();
     } catch (ArgumentNullException $e) {
         throw new RestException("Invalid value of parameter { {$e->getParameter()} }.", RestException::ERROR_ARGUMENT);
     }
 }
Example #2
0
 /**
  * Runs action.
  * Will be run method with name processAction{$actionName}
  * @return mixed
  */
 protected function runAction()
 {
     $description = $this->getActionDescription();
     if ($description['close_session'] === true) {
         //todo be careful by using this features.
         session_write_close();
     }
     $binder = new Engine\Binder($this, 'processAction' . $this->getAction(), array($this->request->getPostList(), $this->request->getQueryList()));
     return $binder->invoke();
 }