PHP Trait to implement ArrayAccess
First, pull in the package through Composer.
Run composer require hepplerdotnet/arrayaccess
And then include the Trait within your Class to implement ArrayAccess.
class Foo implements \ArrayAccess
{
use \HepplerDotNet\ArrayAccess\ArrayAccess;
...
}
That's it, your Class can now use ArrayAccess.