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
$id
`id`
public
int|null
$id
$league
`strLeague`
public
string|null
$league
$leagueBadge
`strLeagueBadge`
public
string|null
$leagueBadge
$leagueId
`idLeague`
public
int|null
$leagueId
$player
`strPlayer`
public
string|null
$player
$playerId
`idPlayer`
public
int|null
$playerId
$raw
public
array<string|int, mixed>
$raw
$season
`strSeason`
public
string|null
$season
$sport
`strSport`
public
string|null
$sport
$statistic
`strStatistic`, e.g. `Goals`, `Appearances`, `Mins Played`
public
string|null
$statistic
$team
`strTeam`
public
string|null
$team
$teamBadge
`strTeamBadge`
public
string|null
$teamBadge
$teamId
`idTeam`
public
int|null
$teamId
$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
stringequals()
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
boolnumericValue()
`value` as a number, when it is one.
public
numericValue() : float|null
Return values
float|nullfmt()
protected
fmt(mixed $value) : string
Parameters
- $value : mixed