Постфиксная запись типов вместо префиксной
This commit is contained in:
parent
04662a94df
commit
11370eecc9
33 changed files with 95 additions and 79 deletions
|
|
@ -47,8 +47,8 @@ class Action
|
|||
private $helpers = array(); // Помошники для действий
|
||||
public $part = null; // Параметры для ссылки
|
||||
|
||||
public /*.Registry.*/$config; // Ссылка на настройки
|
||||
public /*.User.*/$user; // Обьект пользователя
|
||||
public $config/*: Registry*/; // Ссылка на настройки
|
||||
public $user/*: User*/; // Обьект пользователя
|
||||
|
||||
// Для Widgets
|
||||
public $view = null;
|
||||
|
|
@ -124,7 +124,7 @@ class Action
|
|||
if(file_exists($template)) { break; }
|
||||
}
|
||||
|
||||
/*.Composite.*/$tpl = new $viewClass($template);
|
||||
$tpl/*: Composite*/ = new $viewClass($template);
|
||||
$tpl->config = $this->config;
|
||||
|
||||
$stylePath = Path::join($webPath, "assets", "css");
|
||||
|
|
@ -215,7 +215,7 @@ class Action
|
|||
*/
|
||||
public function nUrl($name, array $param = array())
|
||||
{
|
||||
/*.ActionAccess.*/$access = $this->access;
|
||||
$access/*: ActionAccess*/ = $this->access;
|
||||
$url = new Url();
|
||||
|
||||
if ($access == null || $access->checkAction($name)) {
|
||||
|
|
@ -334,7 +334,7 @@ class Action
|
|||
if ($view instanceof View) {
|
||||
$this->view->assignValues($this->ctrlValues);
|
||||
|
||||
/*.Composite.*/$node = null;
|
||||
$node/*: Composite*/ = null;
|
||||
foreach ($this->childNodes as $name => $node) {
|
||||
$node->make($this);
|
||||
$this->view->setView($name, $node->view);
|
||||
|
|
@ -373,7 +373,7 @@ class Action
|
|||
$this->_getActionPath()->getPath($this, ($action) ? $action : $request->getAction());
|
||||
}
|
||||
|
||||
function redirect(/*.string.*/$action) {
|
||||
function redirect($action/*: string*/) {
|
||||
header('location: ' . $action);
|
||||
exit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue