- extending ArrayObject class

- adding some phpunit tests.
This commit is contained in:
Reza
2015-10-17 19:17:25 +03:30
parent 250307b0cf
commit 18a44faad0
4 changed files with 139 additions and 108 deletions

View File

@ -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