You are here

public function AbstractLazyCollection::last in Plug 7

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

Return value

mixed

Overrides Collection::last

File

lib/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php, line 173

Class

AbstractLazyCollection
Lazy collection that is backed by a concrete collection

Namespace

Doctrine\Common\Collections

Code

public function last() {
  $this
    ->initialize();
  return $this->collection
    ->last();
}