DiscordPHP-MTG Documentation

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
since
1.1.0

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|null

scryfall()

The card's Scryfall page, from its set and collector number.

public static scryfall(Card $card) : string|null
Parameters
$card : Card
Return values
string|null

scryfallSet()

A set's Scryfall page.

public static scryfallSet(string $code) : string
Parameters
$code : string
Return values
string

slug()

EDHREC's URL slug for a card name: lower case, ASCII, hyphens.

public static slug(string $name) : string
Parameters
$name : string
Return values
string

stores()

The stores to buy the card from: label → MTGJSON referral URL.

public static stores(Card $card) : array<string, string>
Parameters
$card : Card
Return values
array<string, string>
On this page

Search results