public function remove($index) { if ($this->items[$index]) { array_splice($this->items, $index, 1); } }