Go to file
R. Eric Wheeler 57310f3d26 Fix typo 2016-07-20 14:18:11 -07:00
src/Sikofitt/Utility Added travis and more tests 2016-07-20 11:09:43 -07:00
tests/Sikofitt/Tests Remove php 5.2 from travis and check for HHVM 2016-07-20 13:20:16 -07:00
.gitignore First commit 2016-07-19 14:54:35 -07:00
.php_cs Formatting 2016-07-19 15:02:23 -07:00
.travis.yml Remove php 5.2 from travis and check for HHVM 2016-07-20 13:20:16 -07:00
LICENSE First commit 2016-07-19 14:54:35 -07:00
README.md Fix typo 2016-07-20 14:18:11 -07:00
composer.json Fixed version constraints in tests 2016-07-20 12:58:05 -07:00
composer.lock Fixed version constraints in tests 2016-07-20 12:58:05 -07:00
phpunit.xml.dist First commit 2016-07-19 14:54:35 -07:00

README.md

ArrayObjectArray Build Status

This is an incredibly simple class extension of \ArrayObject to provide array functions use the magic __call method. I no longer like writing this with every project I want to use it in.

Original was from this great bloke. https://secure.php.net/manual/en/class.arrayobject.php#107079

Install

composer require sikofitt/array-object-array

Usage

$arrObj = new Sikofitt\Utility\ArrayObjectArray($myarray);

then use it with any array_* function.

$arrObj->array_keys();
$arrObj->array_values();
$arrObj->array_map(
    function($value) { 
        print sprintf("%s\n", $value); 
    }
);
$arrObj->exchangeArray($myNewArray);

License

MIT

Todo

Finish writing the rest of the tests for array_* functions