- extending ArrayObject class
- adding some phpunit tests.
This commit is contained in:
12
readme.md
12
readme.md
@ -4,7 +4,8 @@ Are you tired from casting objects and arrays to each other? Don't do that anymo
|
||||
|
||||
1. You can access array items using `->` or `['']` syntax.
|
||||
2. You will get `null` if an index does not exists (instead of a nasty notification!)
|
||||
3. You can specify a default value for missing indexes.
|
||||
3. You can specify a default value for missing indexes.
|
||||
4. It extends PHP ArrayObject class. So you can use its methods.
|
||||
|
||||
* The class (`Ary()`) requires PHP 5.4 or newer.
|
||||
* The helper function (`ary()`) requires PHP 5.6 or newer.
|
||||
@ -31,3 +32,12 @@ $ary['newItem']=20;
|
||||
|
||||
count($ary); //returns 3
|
||||
$ary->all(); // returns simple php array;
|
||||
~~~~~~
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
composer require salarmehr/ary
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user