diff --git a/src/Controller/Front.php b/src/Controller/Front.php index af064ad..0d42d4d 100644 --- a/src/Controller/Front.php +++ b/src/Controller/Front.php @@ -56,6 +56,7 @@ class Controller_Front extends Controller_Action $module = $this->loadClass($moduleFile, null, 'Module_'); if ($module) { // Инициализация модуля + $module->front = $this; $module->viewPath = Shortcut::getUrl('modulepath', $name); $module->name = $name; diff --git a/src/HttpRequest.php b/src/HttpRequest.php index 7693177..d34accf 100644 --- a/src/HttpRequest.php +++ b/src/HttpRequest.php @@ -18,11 +18,12 @@ class HttpRequest extends Collection implements ArrayAccess */ public function __construct() { - $list = array ( + $list = [ 'data' => $_REQUEST, 'get' => $_GET, 'post' => $_POST, - 'cookie' => $_COOKIE); + 'cookie' => $_COOKIE + ]; $ajax = $this->isAjax(); foreach ($list as $key => $value) {