public function AbstractLazyCollection::first in Plug 7
Sets the internal iterator to the first element in the collection and returns this element.
Return value
mixed
Overrides Collection::first
File
- lib/doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ AbstractLazyCollection.php, line 164 
Class
- AbstractLazyCollection
- Lazy collection that is backed by a concrete collection
Namespace
Doctrine\Common\CollectionsCode
public function first() {
  $this
    ->initialize();
  return $this->collection
    ->first();
}