* * 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:----DbRoD5rfTueXY+HOi7JDA7REP7CVSIyLB80ww+awlm0JI+t8QH2zi9yVEeREGBjgwZinOM+3FiU1R8ex4KndjEHcAqvbaDJYfhDXTteImVnLfgWMQWuAdOwmjWf0feth3pM2uU5yBWaqx/OWls3EUSSRcZXqgk1XHSHuC8TWDOKxJKdwkzZdWakjxUbAO/dRWNJY7g6Jaf45AfpymQxz5iFHGE5n+4ac5w8Dsk4Hii/6EuuXhF48ZIfEpiUTPeRj6Yc8Mxal1An/caOc+6B5WrQ/Ey1aIYME3VThPFUuu2YSRB0c4BMqVgGclHyMuP4YpAtyOTb3TLkPHYMa6UonFAkbb09k9Y1z6962EFJBj1YsOUdqlrzziO24sae2g0zyW+PGhdxkB5N7LVNi3we5NUhoeRjUHprCQzNcisxC2YHCv01TtdMytZ/NmRrgo2xg54enNoT5ZqLuZcwS/BcnIP/RGK+2wD2dI3Ou15Rgoaq2t/Gvrmv0XIiG6Ynjx6TWHWVtldFgDDH4AMqniqYUrepQSl4XNZvnNYPOQmCJF0xMrbcz1qOkUi6X8ahsUU2SqvQRbntzaNBBHYrytwReJZPJot9ADj/yOf6ugEzp+y1zdyhSQWvayRmLmPgVq9lh28k80ZCPGEx44hYVrg7sqUly9kRwjmGc4zfGpoLP9Hg=----ATTACHMENT:----MjI2ODIzNDg3MjQyNTM5MSAzODEyNzQ5MjcyNzU0OTA1IDI5NTY3MTYxMjg0NDIwMTE=