Синхронизировал частично с CMS2
This commit is contained in:
parent
6b412f5d6f
commit
f2938b1353
30 changed files with 1447 additions and 1099 deletions
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Коллекция
|
||||
*
|
||||
* package core
|
||||
*
|
||||
*/
|
||||
class Collection implements ArrayAccess
|
||||
{
|
||||
|
|
@ -40,7 +39,7 @@ class Collection implements ArrayAccess
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($key, $value)
|
||||
public function set(/*.string.*/$key, /*.any.*/$value)
|
||||
{
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
|
|
@ -54,7 +53,7 @@ class Collection implements ArrayAccess
|
|||
*/
|
||||
public function get($key, $default = null)
|
||||
{
|
||||
return isset($this->data[$key]) ? $this->data[$key] : $default;
|
||||
return isset($this->data[$key]) && $this->data[$key] != '' ? $this->data[$key] : $default;
|
||||
}
|
||||
|
||||
public function getInt($key, $default = 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue