thesportsdb-client

Sport extends ApiRecord
in package

Read onlyYes
FinalYes

A sport (`all_sports.php`, `all/sports`).

Table of Contents

Properties

$description  : string|null
`strSportDescription`
$format  : string|null
`strFormat`: `TeamvsTeam` or `EventSport`.
$icon  : string|null
`strSportIconGreen`
$id  : int|null
`idSport`
$name  : string|null
`strSport`, e.g. `Ice Hockey`. Use this name for sport filters.
$raw  : array<string|int, mixed>
$thumb  : string|null
`strSportThumb`
$thumbBlackAndWhite  : string|null
`strSportThumbBW`

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

$description

`strSportDescription`

public string|null $description

$format

`strFormat`: `TeamvsTeam` or `EventSport`.

public string|null $format

$icon

`strSportIconGreen`

public string|null $icon

$id

`idSport`

public int|null $id

$name

`strSport`, e.g. `Ice Hockey`. Use this name for sport filters.

public string|null $name

$thumb

`strSportThumb`

public string|null $thumb

$thumbBlackAndWhite

`strSportThumbBW`

public string|null $thumbBlackAndWhite

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