Puli\Repository\Resource\Iterator\ResourceCollectionIterator::key PHP Метод

key() публичный Метод

Returns the current key of the iterator.
public key ( ) : integer | string | null
Результат integer | string | null The current key as configured in {@link __construct} or `null` if the cursor is behind the last element.
    public function key()
    {
        if (null === ($key = key($this->resources))) {
            return null;
        }
        if ($this->mode & self::KEY_AS_PATH) {
            return $this->resources[$key]->getPath();
        }
        return $key;
    }