Правки namespace

This commit is contained in:
CORP\phedor 2018-04-13 17:59:57 +03:00
parent ee06f1febb
commit 524b27936a
39 changed files with 141 additions and 120 deletions

35
src/ComponentRequest.php Normal file
View file

@ -0,0 +1,35 @@
<?php
namespace ctiso;
use ctiso\HttpRequest,
ctiso\Arr;
class ComponentRequest {
public $component_id;
public $component_title;
public $r;
function __construct($c, HttpRequest $r) {
$this->component_id = $c;
$this->r = $r;
}
function get($key, $default = null) {
if ($key == 'active_page') {
return $this->r->get($key);
}
if ($arr = $this->r->get($key)) {
if (is_array($arr)) {
return Arr::get($arr, $this->component_id, $default);
} else {
return $arr;
}
}
return $default;
}
function getAction() {
return $this->r->getAction();
}
}