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 Security {
16:     static public function filter_inout($string) {
17:         return nl2br(htmlspecialchars(trim((string)$string), ENT_QUOTES, 'UTF-8'));
18:     }
19:     static public function filter_input($string) {
20:         return htmlspecialchars(trim((string)$string), ENT_QUOTES, 'UTF-8');
21:     }
22:     static public function filter_output($string) {
23:         return nl2br(trim((string)$string));
24:     }
25: }
CodeMania Framework API documentation generated by ApiGen 2.8.0