You are here

public function Collection::last in Plug 7

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

Return value

mixed

2 methods override Collection::last()
AbstractLazyCollection::last in lib/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Sets the internal iterator to the last element in the collection and returns this element.
ArrayCollection::last in lib/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php
Sets the internal iterator to the last element in the collection and returns this element.

File

lib/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php, line 166

Class

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

Namespace

Doctrine\Common\Collections

Code

public function last();