Merge branch 'noglob' of http://gitlab.edu.yar.ru/composer/PHP_Library into noglob
This commit is contained in:
commit
04662a94df
5 changed files with 22 additions and 8 deletions
|
|
@ -12,7 +12,7 @@ use ctiso\HttpRequest,
|
|||
ctiso\Database\PDOStatement,
|
||||
ctiso\Collection,
|
||||
ctiso\Registry,
|
||||
App\Controller\Site,
|
||||
ctiso\Controller\SiteInterface,
|
||||
PHPTAL,
|
||||
PHPTAL_PreFilter_Normalize;
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ class Component
|
|||
$view->component_title = $settings['title'];
|
||||
}
|
||||
|
||||
static function loadComponent($expression, /*.Site.*/ $site)
|
||||
static function loadComponent($expression, /*.SiteInterface.*/ $site)
|
||||
{
|
||||
|
||||
$expression = htmlspecialchars_decode($expression);
|
||||
|
|
@ -249,7 +249,7 @@ class Component
|
|||
}
|
||||
}
|
||||
|
||||
$db = $site->db;
|
||||
$db = $site->getDatabase();
|
||||
|
||||
$component->db = $db;
|
||||
$component->config = $site->config;
|
||||
|
|
|
|||
11
src/Controller/SiteInterface.php
Normal file
11
src/Controller/SiteInterface.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace ctiso\Controller;
|
||||
|
||||
interface SiteInterface {
|
||||
function loadComponent($expression);
|
||||
function getDatabase();
|
||||
function getConfig();
|
||||
function setComponentConfig($config);
|
||||
function addRequireJsPath($name, $path, $schim = null);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue