Example #1
0
 private function guardedSeek($index, $method)
 {
     $index = intGuard($index);
     $this->indexGuard($index, $method);
     return $this->seekTo($index);
 }
Example #2
0
 /**
  * @param int $index
  *
  * @throws TypeException when $index is not an integer.
  * @return void
  */
 function remove($index)
 {
     $ndx = intGuard($index);
     if ($this->offsetExists($ndx)) {
         array_splice($this->array, $ndx, 1);
     }
 }