Типы для php-lint v2
This commit is contained in:
parent
f570da257d
commit
6173eb4892
31 changed files with 83 additions and 76 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue