public function getIndex(array $keys = null, string $keyField = null): FlexIndexInterface
    {
        $index = clone $this->loadIndex();
        $index = $index->withKeyField($keyField);

        if (null !== $keys) {
            $index = $index->select($keys);
        }

        return $index->getIndex();
    }
public function getIndex(array $keys = null, string $keyField = null): FlexIndexInterface
    {
        $index = clone $this->loadIndex();
        $index = $index->withKeyField($keyField);

        if (null !== $keys) {
            $index = $index->select($keys);
        }

        return $index->getIndex();
    }
public function getIndex ( array $ keys = null , string $ keyField = null ) : FlexIndexInterface { $ index = clone $ this -> loadIndex ( ) ; $ index = $ index -> withKeyField ( $ keyField ) ; if ( null !== $ keys ) { $ index = $ index -> select ( $ keys ) ; } return $ index -> getIndex ( ) ; }
Get the full collection of all stored objects.

Use $directory->getCollection() if you want a filtered collection.

@param array|null $keys  Array of keys.
@param string|null $keyField  Field to be used as the key.
@return FlexIndexInterface
Get the full collection of all stored objects .