nspl\ds\Collection::offsetGet PHP Метод

offsetGet() публичный Метод

(PHP 5 >= 5.0.0)
Offset to retrieve
public offsetGet ( integer $index ) : mixed
$index integer

The offset to retrieve.

Результат mixed Can return all value types.
    public function &offsetGet($index)
    {
        if (!isset($this->array[$index])) {
            throw new \Exception('Index out of range');
            // @todo Throw IndexException
        }
        return $this->array[$index];
    }