예제 #1
0
파일: Admin.php 프로젝트: shanmuvel/kohana
 /**
  * Get Agent List
  */
 public function action_get_agent_list()
 {
     // API headers
     Controller_Helper_Header::api_headers($this->response);
     if (HTTP_Request::GET == $this->request->method()) {
         //$data = json_decode(file_get_contents('php://input'), TRUE);
         $response = Controller_Api_Admin::get_agent_list();
         $this->response->headers('Content-Type', 'application/json');
         echo json_encode($response);
     }
     $this->auto_render = FALSE;
 }
예제 #2
0
파일: User.php 프로젝트: shanmuvel/kohana
 /**
  * Resend User Registration Code
  */
 public function action_resend_registration_code()
 {
     // API headers
     Controller_Helper_Header::api_headers($this->response);
     if (HTTP_Request::POST == $this->request->method()) {
         $data = json_decode(file_get_contents('php://input'), TRUE);
         $response = Controller_Api_User::resend_user_registration_code($data);
         $this->response->headers('Content-Type', 'application/json');
         echo json_encode($response);
     }
     $this->auto_render = FALSE;
 }