Добавил namespace и зависимости
This commit is contained in:
parent
e9f7c23990
commit
32ec09a66a
92 changed files with 454 additions and 128 deletions
|
|
@ -3,6 +3,13 @@
|
|||
/**
|
||||
* Расширения для PHPTAL для отображения времени и даты
|
||||
*/
|
||||
namespace ctiso;
|
||||
use PHPTAL_Php_TalesInternal,
|
||||
ctiso\Controller\Site,
|
||||
ctiso\Controller\Component,
|
||||
ctiso\HttpRequest,
|
||||
PHPTAL_TalesRegistry;
|
||||
|
||||
class DateTime_Tales implements PHPTAL_Tales
|
||||
{
|
||||
static public function date($expression, $nothrow = false)
|
||||
|
|
@ -48,10 +55,10 @@ class Tales {
|
|||
/*.Controller_Component.*/$component = null;
|
||||
|
||||
if (class_exists("Controller_Site")) { //Если мы в CMS2
|
||||
$component = Controller_Site::loadComponent($expression);
|
||||
$component = Site::loadComponent($expression);
|
||||
} else {
|
||||
global $db, $registry; // Иначе обращаемся к глобальным переменным
|
||||
$component = Controller_Component::loadComponent($expression, $db, $registry);
|
||||
$component = Component::loadComponent($expression, $db, $registry);
|
||||
}
|
||||
$req = new HttpRequest();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue