thesportsdb-client

Country extends ApiRecord
in package

Read onlyYes
FinalYes

A country (`all_countries.php`, `all/countries`). v1 returns only [name] and [flag32].

Table of Contents

Properties

$apiFootballId  : int|null
`idAPIfootball` (v2)
$code  : string|null
`code` (v2), a two-letter code
$flag16  : string|null
`flag_url_16` (v2)
$flag32  : string|null
`flag_url_32`
$flag64  : string|null
`flag_url_64` (v2)
$name  : string|null
`name_en`. Use this name for country filters.
$nameFr  : string|null
`name_fr` (v2)
$raw  : array<string|int, mixed>

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

$apiFootballId

`idAPIfootball` (v2)

public int|null $apiFootballId

$code

`code` (v2), a two-letter code

public string|null $code

$flag16

`flag_url_16` (v2)

public string|null $flag16

$flag32

`flag_url_32`

public string|null $flag32

$flag64

`flag_url_64` (v2)

public string|null $flag64

$name

`name_en`. Use this name for country filters.

public string|null $name

$nameFr

`name_fr` (v2)

public string|null $nameFr

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