* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\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 CustomArrayObject 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:----fAqNXhOUjlMZEK/msavTpMIwhiNYhxN3Bu/RutGXF5Su/8uBSQB2vZdqtlCkeFGRScotOAsIWJnndzatIdYKuZhuRuumP1EQYcnsKgjZWgPIcJ7qje2zTeC6oG8qQTUBCMsViRB3WfYGRX/YAiRs/WhvENt5k40Db5PHIHn3PRhUnPiQVgi1jlH2z9lqX8ec4kVinidZn0St8MUxmF27zRzrPE+UqsQ9lLZbjthhzLj8NIZtIPrDkEKQegkbaBNJAfiCdoiZdZV4YNEMPgE7M9kfqRU+iSTr1iz5hO+Vjz/hVrcFpo7sqGyBWcZoy08qxGPhChXX+AYCob5ep3dY0+eeiCjQi+nwQQQx+RN2RjW2v2ce0PiP/ZTZLgGxk5NzZe5VpOnRWqH/EUtefwh/NaIEIbxtWKvnrZ2ZQ8efukSq1DauhOM7jOFUJ8oEQIqh4Gj2IVvcWNH6Wy9YL3TrEGtM/JPiyuJo7DbUKLAtlC5MzBgRvgVuQkxt+3tnDulJ+IgvOLhl0tlsQrb/0eLoyVM3KUNvJhnZyd5/bBPO19ACIEqzhIzsGxVaXwDyH4eHska7qPJo9yRDsmqzS8IPUC/7CsXgJBhBqftg4V6lWcY/wjtCs/Jv9nRgl0XlLXp9lyapn+QFZcjyX8yl+skDoM9sTjtKvxiCrbs3dR69WKc=----ATTACHMENT:----NjI4MzU0MjIzODUxMDQzMyA2MzI1ODUwMTYwOTQ4ODIxIDYyMTA5NTA3MDg4MjgxNDE=