Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627<?php
declare(strict_types=1);
namespace Wotnak\Atproto\Lexicon;
/** * Reads lexicons from an overlay repository before falling back to another. * * @api */final readonly class OverlayLexiconRepository implements LexiconRepositoryInterface {
public function __construct( private LexiconRepositoryInterface $overlay, private LexiconRepositoryInterface $fallback, ) {}
/** * Returns the document. */ public function getDocument(string $nsid): ?LexiconDocument { return $this->overlay->getDocument($nsid) ?? $this->fallback->getDocument($nsid); }
}