lithium\data\Collection::first PHP Method

first() public method

Overrides parent first() implementation to enable key/value-based filtering.
public first ( mixed $filter = null ) : object
$filter mixed In addition to a callback (see parent), can also be an array where the keys and values must match the property values of the objects being inspected.
return object Returns the first object found matching the filter criteria.
    public function first($filter = null)
    {
        return parent::first(is_array($filter) ? $this->_filterFromArray($filter) : $filter);
    }