Overview

Namespaces

  • codemania
    • core
      • exception
    • library
      • database
        • drivers
  • None
  • PHP

Classes

  • Cookie
  • Core
  • Crypt
  • HTTP
  • Request
  • Route
  • Security
  • Singleton
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 1: <?php
 2: namespace codemania\core;
 3: /**
 4:  * CodeMania Framework
 5:  * 
 6:  * @author CodeMania Team <team@codemania.ru>
 7:  * @license http://codemania.ru/license.html
 8:  * @package CodeMania
 9:  * @version 1.0.0
10:  * @copyright (c) 2012, CodeMania Team
11:  * @link  http://codemania.ru/
12:  */
13: defined('CM_ROOT') or exit('Заперт доступа!');
14: 
15: class HTTP {
16:     static public $_protocol = 'HTTP/1.0';
17:     static public function init() {
18:         if (isset($_SERVER['SERVER_PROTOCOL'])) {
19:             self::$_protocol = $_SERVER['SERVER_PROTOCOL'];
20:         }
21:     }
22:     static public function set_header_status($message, $code = 500) {
23:         http_response_code($code);
24:         ob_start();
25:         ob_implicit_flush(false);
26:         include CM_ROOT .'codemania/template/http_error.php';
27:         $buffer = ob_get_contents();
28:         ob_end_clean();
29:         return $buffer;
30:     }
31: }
CodeMania Framework API documentation generated by ApiGen 2.8.0