Частичная синхронизация с CMS
This commit is contained in:
parent
312f18a20a
commit
b26e521657
62 changed files with 827 additions and 5992 deletions
16
src/Controller/Request.php
Normal file
16
src/Controller/Request.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
class Controller_Request {
|
||||
function __construct($request, $id) {
|
||||
$this->r = $request;
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
function get($name) {
|
||||
$v = $this->r->get($name);
|
||||
if ($id && is_array($v)) {
|
||||
return isset($v[$id]) ? $v[$id] : $def;
|
||||
}
|
||||
return $v;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue