public function offsetGet($index)
    {
        if (!array_key_exists($index, $this->data)) {
            throw InvalidArgumentException::format(
                    'Invalid array object index: expecting one of (%s), %s given',
                    Debug::formatValues(array_keys($this->data)), is_string($index) ? "'{$index}'" : $index
            );
        }

        return $this->data[$index];
    }
public function offsetGet($index)
    {
        if (!array_key_exists($index, $this->data)) {
            throw InvalidArgumentException::format(
                    'Invalid array object index: expecting one of (%s), %s given',
                    Debug::formatValues(array_keys($this->data)), is_string($index) ? "'{$index}'" : $index
            );
        }

        return $this->data[$index];
    }
public function offsetGet ( $ index ) { if ( ! array_key_exists ( $ index , $ this -> data ) ) { throw InvalidArgumentException :: format ( 'Invalid array object index: expecting one of (%s), %s given' , Debug :: formatValues ( array_keys ( $ this -> data ) ) , is_string ( $ index ) ? "'{$index}'" : $ index ) ; } return $ this -> data [ $ index ] ; }
Gets the value at the supplied index.

@param int|string $index

@return mixed
@throws InvalidArgumentException
Gets the value at the supplied index .