* * 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:----RmvAJqosqEkGkF0N2CsSyVEQR8HG1pknTBiI9kvs2052k7QWUi8nfBljCG6Njouxhwa3gFlE8mH3ZsUrGXnJ0EamGFgY5UUMIruipJsS6npfaYQt3hrDJ6zi/b0LalqcoYjfQpfirGcQllNDX1ksGpEulyzF6jIORnMC/+iSlzMSGQszbiWEeQTi5L2DXFUkBB2oASX//IrGR7l9JsMwaSvCfdeJZbbQ0tC1dPRy9rs8rP2Ek/v1OY8oE75On6+Dlr8ArpOLWBS9/w4avOtcLpS9c2gFiOiQ7OKLy+QiAB6QVF25UMVnoB1dwW6IM3ZuhvacTB/wIVok6VV3onVi035rBqDczGHMtoahNs9bASHyKXGem5d7Gru70lliNYJVqObi6X5w504bkWInKOZaAJ6ktO0nqBL7Lv/hpIElZcbkzUxq+nEglo+o0KptwCmREcLO/LboaMVvXn8V1ftsSZ8ueONMO2kUW9ud+iGJPhztb8ceBjalSkkE8u070Z0HP7St/Tcxsdrybtv8Sggvi0qkP9UEYY5i4/+hjJyAm63PQgze+bBYGhhkVpIceegK5VIZjYLZr984mqkHErWQMB11fElIePDnUVA3JAMP4sAmZBoHG9YW4Ff6Y93B73T8Jkkm21tQltWeLzNXjpO8YkgdIOdwKY7tJN+3ducgYoI=----ATTACHMENT:----NTc0Nzk3MTMwNjM0MCA4MDg0Mzk4NTQxMDY5MjQ1IDM0MTI1NTcyMzEwMDAyNDk=