lithium\data\Collection::find()
Overrides
lithium\util\Collection::find()
Overrides parent find()
implementation to enable key/value-based filtering of entity
objects contained in this collection.
Parameters
-
mixed
$filter
Callback to use for filtering, or array of key/value pairs which entity properties will be matched against.
-
array
$options
Options to modify the behavior of this method. See the documentation for the
$options
parameter oflithium\util\Collection::find()
.
Returns
mixedThe filtered items. Will be an array unless 'collect'
is defined in the
$options
argument, then an instance of this class will be returned.
Source
public function find($filter, array $options = []) {
$this->offsetGet(null);
if (is_array($filter)) {
$filter = $this->_filterFromArray($filter);
}
return parent::find($filter, $options);
}