1<?php 2namespace GuzzleHttp\Ring\Future; 3 4/** 5 * Represents a future array value that when dereferenced returns an array. 6 */ 7#[\AllowDynamicProperties] 8class FutureArray implements FutureArrayInterface 9{ 10 use MagicFutureTrait; 11 12 #[\ReturnTypeWillChange] 13 /** 14 * @return bool 15 */ 16 public function offsetExists($offset) 17 { 18 return isset($this->_value[$offset]); 19 } 20 21 #[\ReturnTypeWillChange] 22 /** 23 * @return mixed 24 */ 25 public function offsetGet($offset) 26 { 27 return $this->_value[$offset]; 28 } 29 30 #[\ReturnTypeWillChange] 31 /** 32 * @return void 33 */ 34 public function offsetSet($offset, $value) 35 { 36 $this->_value[$offset] = $value; 37 } 38 39 #[\ReturnTypeWillChange] 40 /** 41 * @return void 42 */ 43 public function offsetUnset($offset) 44 { 45 unset($this->_value[$offset]); 46 } 47 48 #[\ReturnTypeWillChange] 49 /** 50 * @return int 51 */ 52 public function count() 53 { 54 return count($this->_value); 55 } 56 57 #[\ReturnTypeWillChange] 58 /** 59 * @return \ArrayIterator 60 */ 61 public function getIterator() 62 { 63 return new \ArrayIterator($this->_value); 64 } 65} 66