public function init() { if (isset($_SERVER['REQUEST_METHOD'])) { $router = new Router(); $this->setArrayOfProperties($router->reqPopertiesByUrl()); if (isset($_POST)) { $this->post = $_POST; } $this->setProperty('URL', $_SERVER['REQUEST_URI']); return; } foreach ($_SERVER['argv'] as $arg) { if (strpos($arg, '=')) { list($key, $val) = explode('=', $arg); $this->setProperty($key, $val); } } }