thesportsdb-client

PlayerStat extends ApiRecord
in package

Read onlyYes
FinalYes

One statistic for a player in one season (`lookupplayerstats.php`, `lookup/player_stats`).

Table of Contents

Properties

$id  : int|null
`id`
$league  : string|null
`strLeague`
$leagueBadge  : string|null
`strLeagueBadge`
$leagueId  : int|null
`idLeague`
$player  : string|null
`strPlayer`
$playerId  : int|null
`idPlayer`
$raw  : array<string|int, mixed>
$season  : string|null
`strSeason`
$sport  : string|null
`strSport`
$statistic  : string|null
`strStatistic`, e.g. `Goals`, `Appearances`, `Mins Played`
$team  : string|null
`strTeam`
$teamBadge  : string|null
`strTeamBadge`
$teamId  : int|null
`idTeam`
$value  : string|null
`strValue`, as text

Methods

__construct()  : mixed
__toString()  : string
equals()  : bool
True when $other is the same kind of record, built from the same API fields.
numericValue()  : float|null
`value` as a number, when it is one.
fmt()  : string

Properties

$leagueBadge

`strLeagueBadge`

public string|null $leagueBadge

$statistic

`strStatistic`, e.g. `Goals`, `Appearances`, `Mins Played`

public string|null $statistic

$teamBadge

`strTeamBadge`

public string|null $teamBadge

$value

`strValue`, as text

public string|null $value

Methods

__construct()

public __construct(array<string, string|null> $raw) : mixed
Parameters
$raw : array<string, string|null>

every field as the API sent it (blank strings as null); use it for fields not modelled yet: $team->raw['strKeywords']

__toString()

public __toString() : string
Return values
string

equals()

True when $other is the same kind of record, built from the same API fields.

public equals(self|null $other) : bool
Parameters
$other : self|null
Return values
bool

numericValue()

`value` as a number, when it is one.

public numericValue() : float|null
Return values
float|null

fmt()

protected fmt(mixed $value) : string
Parameters
$value : mixed
Return values
string
On this page

Search results