Lines Matching refs:offset
70 public function offsetExists($offset) argument
72 if (!is_numeric($offset)) {
73 return parent::offsetExists($offset);
75 return isset($this->{$this->collection_key}[$offset]);
79 public function offsetGet($offset) argument
81 if (!is_numeric($offset)) {
82 return parent::offsetGet($offset);
84 $this->coerceType($offset);
85 return $this->{$this->collection_key}[$offset];
89 public function offsetSet($offset, $value) argument
91 if (!is_numeric($offset)) {
92 parent::offsetSet($offset, $value);
94 $this->{$this->collection_key}[$offset] = $value;
98 public function offsetUnset($offset) argument
100 if (!is_numeric($offset)) {
101 parent::offsetUnset($offset);
103 unset($this->{$this->collection_key}[$offset]);
106 private function coerceType($offset) argument
109 if ($keyType && !is_object($this->{$this->collection_key}[$offset])) {
110 $this->{$this->collection_key}[$offset] =
111 new $keyType($this->{$this->collection_key}[$offset]);