public function Collection::first in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php \Doctrine\Common\Collections\Collection::first()
Sets the internal iterator to the first element in the collection and returns this element.
Return value
mixed
2 methods override Collection::first()
- AbstractLazyCollection::first in vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ AbstractLazyCollection.php - Sets the internal iterator to the first element in the collection and returns this element.
- ArrayCollection::first in vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ ArrayCollection.php - Sets the internal iterator to the first element in the collection and returns this element.
File
- vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ Collection.php, line 159
Class
- Collection
- The missing (SPL) Collection/Array/OrderedMap interface.
Namespace
Doctrine\Common\CollectionsCode
public function first();