You are here

public function AbstractLazyCollection::key in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php \Doctrine\Common\Collections\AbstractLazyCollection::key()

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

Return value

int|string

Overrides Collection::key

File

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

Class

AbstractLazyCollection
Lazy collection that is backed by a concrete collection

Namespace

Doctrine\Common\Collections

Code

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