thesportsdb-client

EventResult extends ApiRecord
in package

Read onlyYes
FinalYes

One competitor's result in an individual-sport event: a race, a golf tournament, a fight. Returned both per player (`playerresults.php`) and per event (`eventresults.php`).

Table of Contents

Properties

$country  : string|null
`strCountry`
$date  : DateTimeImmutable|null
`dateEvent` (a date, as midnight UTC)
$detail  : string|null
`strDetail`: e.g. a time gap `+29.520`
$event  : string|null
`strEvent`
$eventId  : int|null
`idEvent`
$id  : int|null
`idResult`
$player  : string|null
`strPlayer`
$playerId  : int|null
`idPlayer`
$points  : int|null
`intPoints`
$position  : int|null
`intPosition`: finishing position
$raw  : array<string|int, mixed>
$result  : string|null
`strResult`: free text
$season  : string|null
`strSeason`
$sport  : string|null
`strSport`
$teamId  : int|null
`idTeam`

Methods

__construct()  : mixed
__toString()  : string
equals()  : bool
True when $other is the same kind of record, built from the same API fields.
fmt()  : string

Properties

$date

`dateEvent` (a date, as midnight UTC)

public DateTimeImmutable|null $date

$detail

`strDetail`: e.g. a time gap `+29.520`

public string|null $detail

$position

`intPosition`: finishing position

public int|null $position

$result

`strResult`: free text

public string|null $result

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

fmt()

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

Search results