thesportsdb-client

LiveScore extends ApiRecord
in package

Read onlyYes
FinalYes

A game in progress (`livescore.php`, `livescore/...`).

Table of Contents

Properties

$awayScore  : int|null
`intAwayScore`
$awayTeam  : string|null
`strAwayTeam`
$awayTeamBadge  : string|null
`strAwayTeamBadge`
$awayTeamId  : int|null
`idAwayTeam`
$date  : DateTimeImmutable|null
`dateEvent` (a date, as midnight UTC)
$division  : int|null
`intDivision`
$eventId  : int|null
`idEvent`
$eventTime  : string|null
`strEventTime`: kick-off, `HH:mm` (HH:MM:SS)
$homeScore  : int|null
`intHomeScore`
$homeTeam  : string|null
`strHomeTeam`
$homeTeamBadge  : string|null
`strHomeTeamBadge`
$homeTeamId  : int|null
`idHomeTeam`
$id  : int|null
`idLiveScore`
$league  : string|null
`strLeague`
$leagueId  : int|null
`idLeague`
$progress  : string|null
`strProgress`: the minute (soccer) or `Final`
$raw  : array<string|int, mixed>
$sport  : string|null
`strSport`
$statusCode  : string|null
`strStatus`: the raw code; see [status]
$timestamp  : DateTimeImmutable|null
`strTimestamp`: kick-off, UTC (UTC)
$updated  : DateTimeImmutable|null
`updated`: when this score was last refreshed (zone not stated) (zone not stated)

Methods

__construct()  : mixed
__toString()  : string
equals()  : bool
True when $other is the same kind of record, built from the same API fields.
status()  : EventStatus
The status code read as a broad status.
fmt()  : string

Properties

$awayScore

`intAwayScore`

public int|null $awayScore

$awayTeam

`strAwayTeam`

public string|null $awayTeam

$awayTeamBadge

`strAwayTeamBadge`

public string|null $awayTeamBadge

$awayTeamId

`idAwayTeam`

public int|null $awayTeamId

$date

`dateEvent` (a date, as midnight UTC)

public DateTimeImmutable|null $date

$division

`intDivision`

public int|null $division

$eventTime

`strEventTime`: kick-off, `HH:mm` (HH:MM:SS)

public string|null $eventTime

$homeScore

`intHomeScore`

public int|null $homeScore

$homeTeam

`strHomeTeam`

public string|null $homeTeam

$homeTeamBadge

`strHomeTeamBadge`

public string|null $homeTeamBadge

$homeTeamId

`idHomeTeam`

public int|null $homeTeamId

$league

`strLeague`

public string|null $league

$leagueId

`idLeague`

public int|null $leagueId

$progress

`strProgress`: the minute (soccer) or `Final`

public string|null $progress

$statusCode

`strStatus`: the raw code; see [status]

public string|null $statusCode

$timestamp

`strTimestamp`: kick-off, UTC (UTC)

public DateTimeImmutable|null $timestamp

$updated

`updated`: when this score was last refreshed (zone not stated) (zone not stated)

public DateTimeImmutable|null $updated

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