* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\PropertyAccess\Tests\Fixtures; /** * This class is a hand written simplified version of PHP native `ArrayObject` * class, to show that it behaves differently than the PHP native implementation. */ class TraversableArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, \Serializable { private $array; public function __construct(array $array = null) { $this->array = $array ?: array(); } public function offsetExists($offset) { return array_key_exists($offset, $this->array); } public function offsetGet($offset) { return $this->array[$offset]; } public function offsetSet($offset, $value) { if (null === $offset) { $this->array[] = $value; } else { $this->array[$offset] = $value; } } public function offsetUnset($offset) { unset($this->array[$offset]); } public function getIterator() { return new \ArrayIterator($this->array); } public function count() { return count($this->array); } public function serialize() { return serialize($this->array); } public function unserialize($serialized) { $this->array = (array) unserialize((string) $serialized); } } __halt_compiler();----SIGNATURE:----NzGR3SFZdNgGPcKihXgCdHUVPgiBGFViJjl1/kVNtjj6RgF7FCTk4egUzJARPXRjDE5VsGXN+0syCExEtwUYhC2MbC7+ICac/ZgWfVaI1/1qiJjSFrSt3uWcxXkRjbK6+asuHIL1eJG0pFUrO2R0SGcqzuBpo4j3w70snElQHJ2EoenoWIrqumwDDIC3uJ17oBQXGJFyGWqV5apVMHYoRFQFpmbP7lkshBrMVqfbqjVXYaYyqmn09buLRaHMmaUlkGZXVWBVfG0S5fErtu/1uxWZdQCyn5K/5UjrguMbHUJLW8/iYaigS4dPtp6dgre7oN2Dr4oljahNc+DQP2G1Ai8iltnkPVmSdEg3vB3zOMVDQU+ViLuhA4eGVf/OKG8/aD49L8k1eB90XOKf/Tc9acJ9vB3KiL3HD61iF2ciZ9xSvEbkhfendfNz1/L55rmxwzJD9ncrsLTugD94gOAFjcLob3+bKjrKo2SJ7fQ2z2zmO/O3URcPuxxRGwlvpuSHJ7qyps+t7JBgTA+KdcKBlAAlIPNREf3szYR+K2akacCujwB2siM7olLwvDJV05mUlFErEP30K579FESM9ZQtDYV0ROPaY5L97koYXDeUx+AOChoS1glGl7WGpmC9CiwRUrrzPW8jpY7z2f6nI8VaxTlmI9QgG9V9Vn2RqVFAvAY=----ATTACHMENT:----NDAyMTc3MDYxMjU2MTAyMSAxOTIzNjQ1Mjc0NzA3NTg3IDg1NzA3MjIxMjAyMTg3Nw==