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;
    }
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;
    }
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 ; }
Returns the current key of the iterator.

@return int|string|null The current key as configured in
{@link __construct} or `null` if the cursor
is behind the last element.
Returns the current key of the iterator .