amdp3-metaforums/Application/HTTP/Request.php

22 lines
484 B
PHP
Raw Normal View History

2019-11-18 13:33:45 +00:00
<?php
namespace Application\HTTP;
class Request {
private $data;
private $query;
public function __construct() {
$this->data = $_REQUEST;
$this->query = $_SERVER['QUERY_STRING'];
}
function queryString() {
return $this->query;
}
function __get($prop) {
2019-11-19 03:36:39 +00:00
if(!array_key_exists($prop,$this->data)) return "";
2019-11-18 13:33:45 +00:00
return $this->data[$prop];
}
function __set($prop, $val) {
$this->data[$prop] = $val;
}
}