|
static | newGame ( $input, array $args, Parser $parser, PPFrame $frame) |
|
static | newPosition (string $input, array $args, Parser $parser, PPFrame $frame) |
|
static | parseArguments (array $args) |
| Return associative array with argument defaults.
|
|
static | generatePieces ( $fen, $swap=false) |
| Create array of mustache arguments for chess-piece.mustache from a given FEN string.
|
|
static | getLocalizedLabels (bool $swap=false) |
| Retrieve the interface text for the correct locale.
|
|
static | getMoveSet ( $gameObject, $annotationObject) |
| Create array of mustache arguments for move-span.mustache from a given array of ply tokens.
|
|
static | getVariationSet ( $variation, $index) |
| Create template parameters for move variation strings.
|
|
static | getMetadata ( $tagPairs) |
| Create array of mustache arguments for ChessBoard.mustache from a given associative array of tag pairs.
|
|
static | createPiece ( $symbol, $rank, $file) |
| Create an array of arguments for chess-piece.mustache for a single piece at a given location on the board.
|
|
◆ createPiece()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::createPiece |
( |
| $symbol, |
|
|
| $rank, |
|
|
| $file ) |
|
static |
Create an array of arguments for chess-piece.mustache for a single piece at a given location on the board.
- Since
- 0.2.0
- Parameters
-
string | $symbol | The FEN symbol for the piece |
string | int | $rank | Preserves input type on output |
string | int | $file | Preserves input type on output |
- Returns
- array
◆ generatePieces()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::generatePieces |
( |
| $fen, |
|
|
| $swap = false ) |
|
static |
Create array of mustache arguments for chess-piece.mustache from a given FEN string.
- Since
- 0.2.0
- Parameters
-
string | $fen | |
bool | $swap | Display from black's perspective if true |
- Returns
- array
◆ getLocalizedLabels()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::getLocalizedLabels |
( |
bool | $swap = false | ) |
|
|
static |
Retrieve the interface text for the correct locale.
- Since
- 0.2.0
- Parameters
-
- Returns
- array
◆ getMetadata()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::getMetadata |
( |
| $tagPairs | ) |
|
|
static |
Create array of mustache arguments for ChessBoard.mustache from a given associative array of tag pairs.
- Since
- 0.2.0
- Parameters
-
- Returns
- array
◆ getMoveSet()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::getMoveSet |
( |
| $gameObject, |
|
|
| $annotationObject ) |
|
static |
Create array of mustache arguments for move-span.mustache from a given array of ply tokens.
- Since
- 0.2.0
- Parameters
-
array | $gameObject | Game representation loaded into data-chess and output from ChessParser::createOutputJson |
array | $annotationObject | representation loaded into data-chess-annotations |
- Returns
- array
◆ getVariationSet()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::getVariationSet |
( |
| $variation, |
|
|
| $index ) |
|
static |
Create template parameters for move variation strings.
- Parameters
-
array | $variation | Object listing tokens, boards, and plys for the variation moves. |
int | $index | The ply of the parent move |
- Returns
- array
◆ newGame()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::newGame |
( |
| $input, |
|
|
array | $args, |
|
|
Parser | $parser, |
|
|
PPFrame | $frame ) |
|
static |
- Since
- 0.1.0
- Parameters
-
string | $input | The wikitext placed between pgn tags |
array | $args | Arguments passed as xml attributes |
Parser | $parser | The MediaWiki parser object |
PPFrame | $frame | Parent frame, provides context of the tage placement |
- Returns
- array
◆ newPosition()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::newPosition |
( |
string | $input, |
|
|
array | $args, |
|
|
Parser | $parser, |
|
|
PPFrame | $frame ) |
|
static |
- Since
- 0.3.0
- Parameters
-
string | $input | The wikitext placed between fen tags |
array | $args | Arguments passed as xml attributes |
Parser | $parser | The MediaWiki parser object |
PPFrame | $frame | Parent frame, provides context of the tage placement |
- Returns
- array
◆ parseArguments()
static MediaWiki\Extension\ChessBrowser\ChessBrowser::parseArguments |
( |
array | $args | ) |
|
|
static |
Return associative array with argument defaults.
- Parameters
-
array | $args | Arguments passed as xml attributes through MediaWiki parser |
- Returns
- array
The documentation for this class was generated from the following file:
- includes/ChessBrowser.php