* * 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:----XRu+EfoAPdzDrCjG+ErC7wRxwnzkHhazGKtDT4ghojD4tfjwLZbVCjettdZXUQDayiGbUC7fU3xQLOi3qBSUY4asIClzZ/pzZao/sQndi39wHFlKyzV2zENqgxEkWOJNwlw/vqkFc8s9RF2NRYzkTA55v1B6E3YWjAPzQ7k2ymRg4ir4EHEXz8nq1Bzzsnf1k5W8LO4TZSB3+2mreN5mCOETmZYBLWSarqHSiJb20Ok1JT3rGvqles4sy11Zs5797L6GWtsqvSlozt/IPuJ/Rau9JtQp3DlrIheRc2eIdELgebFpdqTw0U07yf8PTjYQR76DmnP5IsUSKLjTQ0RASq+zNlAQ10sfcBdFRHgsG7F7iVjgXl1KXxLRIpOEPy+F0hsWyxg9akhNeciyDtIDQItRUZrdjTijhvz/9e1wxQ3yfW04EjoNqnNupH0eRGmfqdQj521GBCUihvRR+X0npmgPdTH4kkBJbaaSPHCW+Z1JoRzViU6nFikHaW8+wMKZjtmYCq3noFREYsSrkBcCpiBLmzlGoWr4wN53Qym9IqTTidKKf77zShssUGwCEORF4XsZAbiK3LRUMIL7Ot7bW582JoZOhCb9m+ojlTpJ3UZ1ybbfLzmTJQY//7sUo2NWggp2Tq9q9tibPwkvfGrLmXdfK+IYUCj5Zplclm6qtzE=----ATTACHMENT:----MjY3MzQyODk4NDExMjQ2MiA2OTI2NDk2NzUzNDQ4NDYgODQ5Mzg4NTUxNjM0MTY=