Этот коммит содержится в:
2017-01-23 13:25:19 +03:00
родитель 6644a5a52d
Коммит 40a11965e5
7 изменённых файлов: 60 добавлений и 12 удалений

Просмотреть файл

@@ -6,17 +6,45 @@
* Time: 01:58
*/
namespace FRM;
namespace PFRM;
class App {
protected $user_agent;
protected $user_IP;
protected $route_table;
function __construct() {
date_default_timezone_set('Europe/Moscow');
error_reporting(E_ALL);
$this->user_agent = $_SERVER['HTTP_USER_AGENT'];
$this->user_IP = $_SERVER['REMOTE_ADDR'];
$this->setRoute('/^\/$/','Index','index');
}
function run(){
/**
* @return mixed
*/
public function getUseragent() {
return $this->user_agent;
}
/**
* @return mixed
*/
public function getUserIP() {
return $this->user_IP;
}
public function setRoute( $regexp, $controller, $action = 'index') {
$this->route_table[] = array($regexp,$controller,$action);
}
public function run(){
}
}