/** * \Simple\Request\HTTP( $_SERVER, $_REQUEST, $_FILES ); * \Simple\Request\Base( '/path/to/resource', 'foo=fooX&bar=barY', 'SIMPLE' ); */ function __construct(&$server = array(), &$request = array(), &$files = array(), $cookies = array()) { $this->_files = $files; $this->_cookies = $cookies; $this->_serverName = $server["SERVER_NAME"]; if (isset($server["HTTPS"]) && $server["HTTPS"] == "on") { $this->_https = true; } if (isset($server["SERVER_PORT"]) && $server["SERVER_PORT"] != "80") { $this->_port = $server["SERVER_PORT"]; } parent::__construct($server["REQUEST_URI"], $server["QUERY_STRING"], $server["REQUEST_METHOD"], $request); }
public function getResourcesByRequest(\Simple\Request\Base &$request, $d = 0) { $this->_request = $request; return $this->getResources($request->getURI(), $d); }