Skip to content

CassetteIndexChain

Tries each CassetteIndexInterface in order and answers the first cassette resolved, the same “try each, fall through on decline, aggregate on total failure” shape Quiote\Storage\Azure\ChainedTokenProvider already uses for token providers.

A null from an index is a decline (try the next); a CassetteIndexException is recorded and also falls through, so one broken/unconfigured index never blocks the others — but if every index either declines or fails, the aggregate exception names every failure, not just “not found.”

final class CassetteIndexChain

SourceIndex/CassetteIndexChain.php
MethodDescription
resolve(list<CassetteIndexInterface> $indexes, CassetteId $id, IndexHints $hints): Cassette

public static function resolve(list<CassetteIndexInterface> $indexes, CassetteId $id, IndexHints $hints): Cassette

ParameterTypeDescription
$indexeslist``<CassetteIndexInterface>
$idCassetteId
$hintsIndexHints

Returns Cassette

ThrowsWhen
CassetteIndexExceptionIf no index in the chain resolved the id.