Обьединение с namespace

This commit is contained in:
CORP\phedor 2018-03-28 11:15:16 +03:00
commit 8b38b2a3cc
90 changed files with 601 additions and 222 deletions

View file

@ -1,5 +1,16 @@
<?php
namespace ctiso\Controller;
use ctiso\Shortcut,
Exception,
ctiso\Path,
ctiso\View\View,
ctiso\Model\Factory,
ctiso\HttpRequest,
ctiso\Functions,
ctiso\Settings,
ctiso\Controller\State;
function forceUrl($name)
{
if (is_callable($name)) {
@ -11,7 +22,7 @@ function forceUrl($name)
/**
* Контроллер страниц
*/
class Controller_Action
class Action
{
const TEMPLATE_EXTENSION = ".html"; // Расширение для шаблонов
@ -78,7 +89,7 @@ class Controller_Action
return Path::join(CMS_PATH, "modules", $name);
}
public function addSuggest(View_View $view, $name)
public function addSuggest(View $view, $name)
{
$suggest = array();
$file = Path::join($this->viewPath, 'help', $name . '.suggest');
@ -141,7 +152,7 @@ class Controller_Action
public function getModel($name)
{
if (!$this->factory) {
$this->factory = new Model_Factory($this->db, $this->_registry);
$this->factory = new Factory($this->db, $this->_registry);
}
return $this->factory->getModel($name);
}
@ -364,7 +375,7 @@ class Controller_Action
function _getActionPath()
{
return new Controller_State('index');
return new State('index');
}
// Тоже убрать в метод Controller_Model