Links
in package
FinalYes
Links from a card or set to the sites players use: Scryfall, EDHREC and the stores in its MTGJSON purchase URLs. Pure.
Tags
Table of Contents
Constants
- STORES : array<string, string> = ['tcgplayer' => 'TCGplayer', 'cardKingdom' => '...
- Stores in a card's `purchaseUrls`, in button order.
Methods
- edhrec() : string|null
- The card's EDHREC page — only for cards with an EDHREC rank.
- scryfall() : string|null
- The card's Scryfall page, from its set and collector number.
- scryfallSet() : string
- A set's Scryfall page.
- slug() : string
- EDHREC's URL slug for a card name: lower case, ASCII, hyphens.
- stores() : array<string, string>
- The stores to buy the card from: label → MTGJSON referral URL.
Constants
STORES
Stores in a card's `purchaseUrls`, in button order.
public
array<string, string>
STORES
= ['tcgplayer' => 'TCGplayer', 'cardKingdom' => 'Card Kingdom', 'cardmarket' => 'Cardmarket']
Methods
edhrec()
The card's EDHREC page — only for cards with an EDHREC rank.
public
static edhrec(Card $card) : string|null
Parameters
- $card : Card
Return values
string|nullscryfall()
The card's Scryfall page, from its set and collector number.
public
static scryfall(Card $card) : string|null
Parameters
- $card : Card
Return values
string|nullscryfallSet()
A set's Scryfall page.
public
static scryfallSet(string $code) : string
Parameters
- $code : string
Return values
stringslug()
EDHREC's URL slug for a card name: lower case, ASCII, hyphens.
public
static slug(string $name) : string
Parameters
- $name : string
Return values
stringstores()
The stores to buy the card from: label → MTGJSON referral URL.
public
static stores(Card $card) : array<string, string>
Parameters
- $card : Card