R. Eric Wheeler 150ed44033 | ||
---|---|---|
src/Sikofitt/Utility | ||
tests/Sikofitt/Tests | ||
.gitignore | ||
.php_cs | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
composer.json | ||
composer.lock | ||
phpunit.xml.dist |
README.md
ArrayObjectArray
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