Добавил namespace и зависимости

This commit is contained in:
CORP\phedor 2018-03-27 17:40:33 +03:00
parent e9f7c23990
commit 32ec09a66a
92 changed files with 454 additions and 128 deletions

View file

@ -1,6 +1,9 @@
<?php
class Controller_State
namespace ctiso\Controller;
use ctiso\Controller\Action;
class State
{
public $action = '';
public $states = array();
@ -13,7 +16,7 @@ class Controller_State
static function make($action)
{
return new Controller_State($action);
return new State($action);
}
public function addTitle($name, $url = array())
@ -22,7 +25,7 @@ class Controller_State
return $this;
}
public function addState(Controller_State $state)
public function addState(State $state)
{
$this->states [$state->getAction()] = $state;
return $this;
@ -49,7 +52,7 @@ class Controller_State
return false;
}
function makeTitle(Controller_Action $module)
function makeTitle(Action $module)
{
foreach ($this->titles as $item) {
$module->path->addMenuItem($module->nUrl($this->action, $item[1]), $item[0]);