Типы для php-lint v2

This commit is contained in:
origami11 2021-02-22 14:07:51 +03:00
parent f570da257d
commit 6173eb4892
31 changed files with 83 additions and 76 deletions

View file

@ -1,13 +1,17 @@
<?php
class Controller_Request {
public $r;
public $id;
function __construct($request, $id) {
$this->r = $request;
$this->id = $id;
}
function get($name) {
function get($name, $def = null) {
$v = $this->r->get($name);
$id = $this->id;
if ($id && is_array($v)) {
return isset($v[$id]) ? $v[$id] : $def;
}