fix Validator

This commit is contained in:
origami11@yandex.ru 2022-11-28 18:44:09 +03:00
parent 28429039a4
commit 526262c80b
9 changed files with 38 additions and 39 deletions

View file

@ -26,6 +26,7 @@ class Action
// Параметры устанавливаются при создании контроллера
public $name = ''; // Имя модуля
public $front;
public $modulePath = null; // Путь к модулю
public $moduleTitle = '';

View file

@ -171,8 +171,9 @@ class Component
*/
public function getModel($name)
{
$modelName = "Mapper_" . $name;
$modelName = "App\\Mapper\\" . $name;
$model = new $modelName();
$model->config = $this->config;
$model->db = $this->db;
return $model;
}
@ -260,7 +261,7 @@ class Component
} else {
$component = new $className();
$template = $component->getTemplateName($registry);
$template = $component->getTemplateName($site->config);
$component->viewPath = array(
// Сначало ищем локально

View file

@ -67,6 +67,7 @@ class Front extends Action
$module->config = $this->config;
$module->db = $this->db;
$module->user = $this->user;
$module->front = $this;
// Ведение лога
$logger = new ActionLogger($module, $logPath, $this->user);
$logger->before = $this->loadSettings(Path::join($modPath, 'filter', 'logger.php'));

View file

@ -3,6 +3,7 @@
namespace ctiso\Controller;
interface SiteInterface {
function getResource();
function loadComponent($expression);
function getDatabase();
function getConfig();