You are here

public function Collection::key in Plug 7

Gets the key/index of the element at the current iterator position.

Return value

int|string

2 methods override Collection::key()
AbstractLazyCollection::key in lib/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Gets the key/index of the element at the current iterator position.
ArrayCollection::key in lib/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php
Gets the key/index of the element at the current iterator position.

File

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

Class

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

Namespace

Doctrine\Common\Collections

Code

public function key();