Merge remote-tracking branch 'origin/master'
Conflicts: readme.md
This commit is contained in:
@ -6,6 +6,9 @@ Are you tired from casting objects and array to each other? Ary is a light class
|
|||||||
2. You will get `null` if an index does not exists.
|
2. You will get `null` if an index does not exists.
|
||||||
3. You can specify a default value for a missing index.
|
3. You can specify a default value for a missing index.
|
||||||
|
|
||||||
|
* The class (`Ary()`) requires PHP 5.4 or newer.
|
||||||
|
* The helper function (`ary()`) requires PHP 5.6 or newer.
|
||||||
|
|
||||||
~~~~~
|
~~~~~
|
||||||
// instantiation
|
// instantiation
|
||||||
$ary = new Ary();
|
$ary = new Ary();
|
||||||
@ -27,4 +30,4 @@ $ary->newItem=20; //or
|
|||||||
$ary['newItem']=20;
|
$ary['newItem']=20;
|
||||||
|
|
||||||
count($ary); //returns 3
|
count($ary); //returns 3
|
||||||
$ary->all(); // returns simple php array;
|
$ary->all(); // returns simple php array;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Created by PhpStorm.
|
* Created Reza Salarmehr.
|
||||||
*
|
*
|
||||||
* Inspired by Laravel Collection and Arr class.
|
* Some methods are from Laravel source code.
|
||||||
*
|
*
|
||||||
* Date: 18/09/2015
|
* Date: 18/09/2015
|
||||||
* Time: 22:37
|
* Time: 22:37
|
||||||
|
Reference in New Issue
Block a user