* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\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:----VsniBo1RB5Q4poDtNGdD+X3q+ciqafZZR9/Q42FfrOczMzkWHgCsOU6TzpEEa9Ljr6QMNJ5o4qeoKfTQZOW5TYkmoTYShxz21DR7ESzxHlb0RhA6F/vAF4F5AWe4zGZED8vRAclAmhbFovnBsrl2LK4uR8DTqocgpSOzNuGH46dG/0h6fKexOdRSdqx2uuNmpaC5Z7UZAEyZ8/ul7o7VchchHWD8ArT267EpRNR3qDX1YsCqcbCYhynqWIt/CPDVgRIb6NmoVFDCIoWaNmYiUeAyouFJUJKLkm/cIDO2x6sOpk/uJrUPrRuqqqxL+0zOYC3Wpq8ryWsVgZiOZ6cxaxVCVZ3m6fnZnSwZK4h+JZHwI5c2Fj/KKKidLxkU96IX+valba6Izb3UoPuQku+ZdS8Ylq0ic0E65xSEEvI7DpKJ6xEI6TrsyLQzoDL9o6tLaDVeA7pkMS0HgsbnaBXT6KhsBmx32tXahOh5mSbrG7wIYSafJSqa8VSq6HIc6pMVGDIgfEcnfKirCIwQHDsPRGVhKuFOQfWpMfuSdelNO8lkJvkpwglpJ+iTQlimWEIcFYA9xSmDLdZvxtJI2G71GHEUxi/6RXuGYxoHhbMi256vIuiM5oIL6QWtDLGgY05mnmFp0YZamBBEh6JfZ4v5Lt4Pv4SYAq568E+c7s0ewok=----ATTACHMENT:----MjgzODI1MjQ3OTc0Njc3NiA4Nzc3NTc2Mjg4ODIwMDA3IDYzMDg4Njg1Nzk3ODYxMzg=