Beispiel #1
0
 public function after()
 {
     parent::after();
     if ($this->auto_render === TRUE) {
         $this->driver->render($this->resource);
     }
 }
Beispiel #2
0
 public function after()
 {
     $this->request->response = $this->_serialize($this->response);
     $this->request->headers['Content-Type'] = $this->_format_content_type($this->_format);
     if ($this->_cache_hit) {
         $this->request->headers[self::HDR_CACHE_HIT] = 'true';
     }
     return parent::after();
 }
Beispiel #3
0
 public function before()
 {
     parent::before();
     $param = $this->request->param();
     // Set the input property
     $this->_input = (array) json_decode($this->request->body(), TRUE);
     // Set the model using the id parameter (and the id attribute if that is not given)
     /* $this->user = ORM::factory('user',
        $this->request->param('id',
        Arr::get($this->_input, 'id'))); */
 }
Beispiel #4
0
 /**
  * Sets the content-type header to application/json
  */
 public function after()
 {
     $this->response->headers('content-type', 'application/json');
     // Execute parent's after method
     parent::after();
 }
Beispiel #5
0
 public function after()
 {
     // enable Browser caching
     //$this->enable_browser_caching();
     $this->response->headers('content-type', 'application/json');
     parent::after();
 }
Beispiel #6
0
 public function after()
 {
     $this->response->headers('Content-Type', 'application/json');
     $this->response->body($this->encode_response($this->_raw_response));
     return parent::after();
 }