lithium\data\Collection::offsetGet()
Overrides
lithium\util\Collection::offsetGet()
Gets an Entity
object using PHP's array syntax, i.e. $documents[3]
or $records[5]
.
Parameters
-
mixed
$offset
The offset.
Returns
mixedReturns an Entity
object if exists otherwise returns null
.
Source
public function offsetGet($offset) {
while (!array_key_exists($offset, $this->_data) && $this->_populate()) {}
if (array_key_exists($offset, $this->_data)) {
return $this->_data[$offset];
}
return null;
}