tasks[$offset]); } /** * ArrayAccess method * * @param mixed $offset Array offset */ public function offsetGet($offset) { return $this->offsetExists($offset) ? $this->tasks[$offset] : null; } /** * ArrayAccess method * * @param mixed $offset Array offset * @param mixed $value New value */ public function offsetSet($offset, $value) { if ($offset === null) { $this->tasks[] = $value; } else { $this->tasks[$offset] = $value; } } /** * ArrayAccess method * * @param mixed $offset Array offset */ public function offsetUnset($offset) { $this->tasks[$offset] = null; } }