'ASC'|'DESC', ...]. * * @return FlexCollectionInterface Returns a sorted version from the collection. */ public function sort(array $orderings); /** * Filter collection by filter array with keys and values. * * @param array $filters * @return FlexCollectionInterface */ public function filterBy(array $filters); /** * Get timestamps from all the objects in the collection. * * This method can be used for example in caching. * * @return int[] Returns [key => timestamp, ...] pairs. */ public function getTimestamps(): array; /** * Get storage keys from all the objects in the collection. * * @see FlexDirectory::getObject() If you want to get Flex Object from the Flex Directory. * * @return string[] Returns [key => storage_key, ...] pairs. */ public function getStorageKeys(): array; /** * Get Flex keys from all the objects in the collection. * * @see Flex::getObjects() If you want to get list of Flex Objects from any Flex Directory. * * @return string[] Returns[key => flex_key, ...] pairs. */ public function getFlexKeys(): array; /** * Return new collection with a different key. * * @param string|null $keyField Switch key field of the collection. * * @return FlexCollectionInterface Returns a new Flex Collection with new key field. * @api */ public function withKeyField(string $keyField = null); /** * Get Flex Index from the Flex Collection. * * @return FlexIndexInterface Returns a Flex Index from the current collection. */ public function getIndex(); }