Repository
Table of Contents
Classes
- AbstractRepository
- Base class for the MTG read-only repositories: DiscordPHP's
{@see DiscordAbstractRepository} behaviour (keyed, cached collection of
Parts) backed by {@see \MTG\Http\Http} and MTG {@see \MTG\Http\Endpoint}s
instead of the Discord API. Concrete repositories ({@see CardRepository},
{@see SetRepository}) declare their endpoint map and Part class.
- CardRepository
- Reads the API's `cards` endpoint — list/search with query filters and
pagination, and fetch a single card by id — hydrating {@see Card} parts.
- SetRepository
- Reads the API's `sets` endpoint — list sets, fetch one by code, and
generate a booster pack from a set — hydrating {@see Set} parts.
Traits
- AbstractRepositoryTrait
- Shared implementation for every MTG repository: DiscordPHP's
`AbstractRepositoryTrait` ported so the collection is keyed and cached the
same way, but backed by {@see \MTG\Http\Http} and MTG
{@see \MTG\Http\Endpoint}s. Consumed by {@see AbstractRepository}.