OpenCart 🇺🇦

Класс Request { ... }

Класс является оберткой над $_POST, $_GET, $_REQUEST

Название свойства Описание
Request::$get public mixed $get = array();
Request::$post public mixed $post = array();
Request::$cookie public mixed $cookie = array();
Request::$files public mixed $files = array();
Request::$server public mixed $server = array();
Тип Возвр. Описание
public mixed __construct ( )
Исходный код метода:
$_GET = $this->clean($_GET);
$_POST = $this->clean($_POST);
$_REQUEST = $this->clean($_REQUEST);
$_COOKIE = $this->clean($_COOKIE);
$_FILES = $this->clean($_FILES);
$_SERVER = $this->clean($_SERVER);

$this->get = $_GET;
$this->post = $_POST;
$this->request = $_REQUEST;
$this->cookie = $_COOKIE;
$this->files = $_FILES;
$this->server = $_SERVER;
public mixed clean ( $data )
Исходный код метода:
if (is_array($data)) {
	foreach ($data as $key => $value) {
		unset($data[$key]);

		$data[$this->clean($key)] = $this->clean($value);
	}
} else { 
	$data = htmlspecialchars($data, ENT_COMPAT, 'UTF-8');
}

return $data;

Связанные классы:

Название класса Роль
Нет связанных классов

Комментарии