08/09
2017
Wallogit.com
2017 © Pedro Peláez
Trait to implement ArrayAccess
PHP Trait to implement ArrayAccess, (*1)
First, pull in the package through Composer., (*2)
Run composer require hepplerdotnet/arrayaccess, (*3)
And then include the Trait within your Class to implement ArrayAccess., (*4)
class Foo implements \ArrayAccess
{
use \HepplerDotNet\ArrayAccess\ArrayAccess;
...
}
That's it, your Class can now use ArrayAccess., (*5)