/**
  * Perform some actions before redirect
  *
  * FIXME: check. Action should not be an optional param
  *
  * @param string $action Current action OPTIONAL
  *
  * @return void
  */
 protected function actionPostprocess($action = null)
 {
     parent::actionPostprocess($action);
     if ($action) {
         $this->assembleReturnURL();
     }
 }
예제 #2
0
파일: Rest.php 프로젝트: kingsj/core
 /**
  * Perform some actions before redirect
  *
  * FIXME: check. Action should not be an optional param
  *
  * @param string|null $action Performed action OPTIONAL
  *
  * @return void
  */
 protected function actionPostprocess($action = null)
 {
     parent::actionPostprocess($action);
     header('Content-type: application/json');
     $data = json_encode($this->data);
     header('Content-Length: ' . strlen($data));
     echo $data;
     exit(0);
 }