nspl\ds\DefaultArray::offsetGet PHP Method

offsetGet() public method

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

The offset to retrieve.

return mixed Can return all value types.
    public function &offsetGet($index)
    {
        if (!$this->offsetExists($index)) {
            $this->offsetSet($index, $this->getDefault());
        }
        return parent::offsetGet($index);
    }