AvailAtTheShop
in package
lit le fichier disponible.tsv s'il existe et stoke les cartes dispo. dans la boutique
Table of Contents
Constants
- FILE_NAME = __DIR__ . '/available.tsv'
- chemin du fichier tsv
- MAX_DURATION = 7 * 24 * 60 * 60
- durée en secondes pendant laquelle le fichier FILE_NAME reste valide
Properties
- $all : array<string, string>
Methods
- exists() : bool
- indique s'il existe au moins une carte disponible
- init() : void
- charge le fichier dans self::$all
- load() : void
- chargement du fichier available.tsv
- maj() : string
- showTsvAsTable() : void
- affiche comme table Html un tableau dont chaque ligne est une chaine avec \t comme séparateur $header est soit une ligne avec séparateurs \t, soit nul
Constants
FILE_NAME
chemin du fichier tsv
public
mixed
FILE_NAME
= __DIR__ . '/available.tsv'
MAX_DURATION
durée en secondes pendant laquelle le fichier FILE_NAME reste valide
public
mixed
MAX_DURATION
= 7 * 24 * 60 * 60
Properties
$all
public
static array<string, string>
$all
= []
Methods
exists()
indique s'il existe au moins une carte disponible
public
static exists() : bool
Return values
boolinit()
charge le fichier dans self::$all
public
static init() : void
load()
chargement du fichier available.tsv
public
static load() : void
maj()
public
static maj(string $mapNum) : string
Parameters
- $mapNum : string
Return values
stringshowTsvAsTable()
affiche comme table Html un tableau dont chaque ligne est une chaine avec \t comme séparateur $header est soit une ligne avec séparateurs \t, soit nul
private
static showTsvAsTable(array<int, string> $data[, string|null $header = null ]) : void
Parameters
- $data : array<int, string>
- $header : string|null = null