vendor/payum/core/Payum/Core/Model/ArrayObject.php line 4

Open in your IDE?
  1. <?php
  2. namespace Payum\Core\Model;
  3. class ArrayObject implements \ArrayAccess\IteratorAggregate
  4. {
  5.     /**
  6.      * @var array
  7.      */
  8.     protected $details = array();
  9.     /**
  10.      * {@inheritDoc}
  11.      */
  12.     #[\ReturnTypeWillChange]
  13.     public function offsetExists($offset)
  14.     {
  15.         return array_key_exists($offset$this->details);
  16.     }
  17.     /**
  18.      * {@inheritDoc}
  19.      */
  20.     #[\ReturnTypeWillChange]
  21.     public function offsetGet($offset)
  22.     {
  23.         return $this->details[$offset];
  24.     }
  25.     /**
  26.      * {@inheritDoc}
  27.      */
  28.     #[\ReturnTypeWillChange]
  29.     public function offsetSet($offset$value)
  30.     {
  31.         $this->details[$offset] = $value;
  32.     }
  33.     /**
  34.      * {@inheritDoc}
  35.      */
  36.     #[\ReturnTypeWillChange]
  37.     public function offsetUnset($offset)
  38.     {
  39.         unset($this->details[$offset]);
  40.     }
  41.     /**
  42.      * {@inheritDoc}
  43.      */
  44.     #[\ReturnTypeWillChange]
  45.     public function getIterator()
  46.     {
  47.         return new \ArrayIterator($this->details);
  48.     }
  49. }