13:25
Этот коммит содержится в:
32
frm/App.php
32
frm/App.php
@@ -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(){
|
||||
|
||||
}
|
||||
}
|
Ссылка в новой задаче
Block a user