Оптимизации и исправления топов.
This commit is contained in:
parent
77fa3dbd5e
commit
0f4b2fb722
25 changed files with 109 additions and 53 deletions
|
|
@ -58,17 +58,17 @@ class Collection implements ArrayAccess
|
|||
|
||||
public function getInt($key, $default = 0)
|
||||
{
|
||||
return intval($this->get($key, $default));
|
||||
return (int)$this->get($key, $default);
|
||||
}
|
||||
|
||||
public function getString($key, $default = '')
|
||||
{
|
||||
return ((string) $this->get($key, $default));
|
||||
return (string)$this->get($key, $default);
|
||||
}
|
||||
|
||||
public function getNat($key, $default = 1)
|
||||
{
|
||||
$result = intval($this->get($key, $default));
|
||||
$result = (int)$this->get($key, $default);
|
||||
return (($result > 0) ? $result : $default);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue