set_status_header() public method

As of version 1.7.2, this is an alias for common function set_status_header().
public set_status_header ( integer $code = 200, string $text = '' ) : CI_Output
$code integer Status code (default: 200)
$text string Optional message
return CI_Output
Exemplo n.º 1
0
 /**
  * Set output content
  * 
  * @param string $type data type
  * @param array $value data value
  * @return void
  */
 public function setOutputContent($type = 'data', $value = array())
 {
     switch (strtolower($type)) {
         case 'data':
             $this->data = $value;
             break;
         case 'errors':
             $this->errors = $value;
             break;
         case 'success':
             $this->success = $value;
             break;
         case 'template':
             $this->template = $value;
             break;
         case 'code':
             parent::set_status_header($value);
             $this->code = $value;
             break;
         case 'header':
             $this->header = $value;
             break;
         case 'help':
             $this->help = $value;
             break;
         case 'back_link':
             $this->back_link = $value;
             break;
         case 'redirect':
             $this->redirect = $value;
             break;
     }
 }
Exemplo n.º 2
0
 function set_status_header($code = 200, $text = '')
 {
     $this->set_header('Status-Text: ' . json_encode($text));
     parent::set_status_header($code, $text);
 }