for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Resilient\Traits;
trait ArrayAccessAble
{
protected $offset = [];
/**
* ArrayAccess Implementations
*/
* {@inheritdoc}
public function offsetExists($key)
return array_key_exists($key, $this->offset);
}
public function offsetGet($key)
return $this->offset[$key];
public function offsetSet($key, $value)
$this->offset[$key] = $value;
public function offsetUnset($key)
unset($this->offset[$key]);
public function count()
return count($this->offset);
public function getIterator()
return new \ArrayIterator($this->offset);