lithium\data\Collection::first PHP Méthode

first() public méthode

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.
Résultat 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);
    }