DiscordPHP-MTG Documentation

Deck extends Part
in package

A preconstructed deck — MTGJSON's Deck model, or a Deck List entry (no cards) when it comes from {@see \MTG\Repository\DeckRepository::getDecks()}.

Cards in a deck are Cards with count (and isFoil/isEtched).

Tags
link

Deck model

Deck List model

since
1.0.0

Table of Contents

Properties

$code  : string|null
$commander  : ExCollectionInterface<string|int, Card>
$displayCommander  : ExCollectionInterface<string|int, Card>
$fileName  : string|null
$mainBoard  : ExCollectionInterface<string|int, Card>
$name  : string|null
$planes  : ExCollectionInterface<string|int, Card>
$releaseDate  : Carbon|null
$schemes  : ExCollectionInterface<string|int, Card>
$sealedProductUuids  : array<string|int, string>|null
$sideBoard  : ExCollectionInterface<string|int, Card>
$sourceSetCodes  : array<string|int, string>|null
$tokens  : ExCollectionInterface<string|int, Card>
$type  : string|null
$fillable  : mixed

Methods

hasCards()  : bool
Whether the deck carries its cards (a Deck), or only its summary (a Deck List entry).
cards()  : ExCollectionInterface<string|int, Card>
Builds one of the deck's card lists. Not keyed by uuid: a deck can hold the same printing as foil and non-foil.
getCommanderAttribute()  : ExCollectionInterface<string|int, Card>
getDisplayCommanderAttribute()  : ExCollectionInterface<string|int, Card>
getMainBoardAttribute()  : ExCollectionInterface<string|int, Card>
getPlanesAttribute()  : ExCollectionInterface<string|int, Card>
getReleaseDateAttribute()  : Carbon|null
Gets the release date of the deck.
getSchemesAttribute()  : ExCollectionInterface<string|int, Card>
getSideBoardAttribute()  : ExCollectionInterface<string|int, Card>
getTokensAttribute()  : ExCollectionInterface<string|int, Card>

Properties

$code

public string|null $code

The printing set code for the deck.

$commander read-only

public ExCollectionInterface<string|int, Card> $commander

The commander(s) of the deck.

$displayCommander read-only

public ExCollectionInterface<string|int, Card> $displayCommander

The card(s) displayed on the front of the deck box.

$fileName

public string|null $fileName

The file name for the deck: decks/{fileName}.json. Deck List only.

$mainBoard read-only

public ExCollectionInterface<string|int, Card> $mainBoard

The cards in the main board.

$name

public string|null $name

The name of the deck.

$planes read-only

public ExCollectionInterface<string|int, Card> $planes

The planes, for Planechase decks.

$releaseDate read-only

public Carbon|null $releaseDate

The release date of the deck.

$schemes read-only

public ExCollectionInterface<string|int, Card> $schemes

The schemes, for Archenemy decks.

$sealedProductUuids

public array<string|int, string>|null $sealedProductUuids

The sealed product UUIDs the deck comes in.

$sideBoard read-only

public ExCollectionInterface<string|int, Card> $sideBoard

The cards in the side board.

$sourceSetCodes

public array<string|int, string>|null $sourceSetCodes

The set codes the deck's cards come from.

$tokens read-only

public ExCollectionInterface<string|int, Card> $tokens

The tokens the deck comes with.

$type

public string|null $type

The type of deck (Commander Deck, Intro Pack, Theme Deck, …).

$fillable

protected mixed $fillable = ['code', 'commander', 'displayCommander', 'fileName', 'mainBoard', 'name', 'planes', 'releaseDate', 'schemes', 'sealedProductUuids', 'sideBoard', 'sourceSetCodes', 'tokens', 'type']
Tags
inheritDoc

Methods

hasCards()

Whether the deck carries its cards (a Deck), or only its summary (a Deck List entry).

public hasCards() : bool
Return values
bool

cards()

Builds one of the deck's card lists. Not keyed by uuid: a deck can hold the same printing as foil and non-foil.

protected cards(string $key) : ExCollectionInterface<string|int, Card>
Parameters
$key : string

The attribute.

Return values
ExCollectionInterface<string|int, Card>

getCommanderAttribute()

protected getCommanderAttribute() : ExCollectionInterface<string|int, Card>
Return values
ExCollectionInterface<string|int, Card>

getDisplayCommanderAttribute()

protected getDisplayCommanderAttribute() : ExCollectionInterface<string|int, Card>
Return values
ExCollectionInterface<string|int, Card>

getMainBoardAttribute()

protected getMainBoardAttribute() : ExCollectionInterface<string|int, Card>
Return values
ExCollectionInterface<string|int, Card>

getPlanesAttribute()

protected getPlanesAttribute() : ExCollectionInterface<string|int, Card>
Return values
ExCollectionInterface<string|int, Card>

getReleaseDateAttribute()

Gets the release date of the deck.

protected getReleaseDateAttribute() : Carbon|null
Return values
Carbon|null

getSchemesAttribute()

protected getSchemesAttribute() : ExCollectionInterface<string|int, Card>
Return values
ExCollectionInterface<string|int, Card>

getSideBoardAttribute()

protected getSideBoardAttribute() : ExCollectionInterface<string|int, Card>
Return values
ExCollectionInterface<string|int, Card>

getTokensAttribute()

protected getTokensAttribute() : ExCollectionInterface<string|int, Card>
Return values
ExCollectionInterface<string|int, Card>
On this page

Search results