fix Validator
This commit is contained in:
parent
28429039a4
commit
526262c80b
9 changed files with 38 additions and 39 deletions
|
|
@ -26,6 +26,7 @@ class Action
|
|||
|
||||
// Параметры устанавливаются при создании контроллера
|
||||
public $name = ''; // Имя модуля
|
||||
public $front;
|
||||
|
||||
public $modulePath = null; // Путь к модулю
|
||||
public $moduleTitle = '';
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
// Сначало ищем локально
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace ctiso\Controller;
|
||||
|
||||
interface SiteInterface {
|
||||
function getResource();
|
||||
function loadComponent($expression);
|
||||
function getDatabase();
|
||||
function getConfig();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue