lithium\data\Collection::first PHP 메소드

first() 공개 메소드

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.
리턴 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);
    }