function Collection::first

Sets the internal iterator to the first element in the collection and returns this element.

Return value

mixed

1 method overrides Collection::first()
ArrayCollection::first in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Collections/ArrayCollection.php
Sets the internal iterator to the first element in the collection and returns this element.

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Collections/Collection.php, line 147

Class

Collection
The missing (SPL) Collection/Array/OrderedMap interface.

Namespace

Doctrine\Common\Collections

Code

function first();