\cheetahTeam

Class Team Models a team from the teams table

Summary

Methods
Properties
Constants
__construct()
tableName()
fromRow()
toArray()
toJsonArray()
$id
$name
$shortname
$abbreviation
$icon
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : \cheetah\int:

Type

\cheetah\int: — The ID of the Team in the database

$name

$name : \cheetah\string:

Type

\cheetah\string: — The full name of the Team

$shortname

$shortname : \cheetah\string:

Type

\cheetah\string: — A shortened version of the team's name

$abbreviation

$abbreviation : \cheetah\string:

Type

\cheetah\string: — A 3-character abbreviation associated with the Team

$icon

$icon : \cheetah\string:

Type

\cheetah\string: — A path to an image of the Team's logo

Methods

__construct()

__construct(\cheetah\int  $id, \cheetah\string  $name, \cheetah\string  $shortname, \cheetah\string  $abbreviation, \cheetah\string  $icon) 

Team constructor.

Parameters

\cheetah\int $id
\cheetah\string $name
\cheetah\string $shortname
\cheetah\string $abbreviation
\cheetah\string $icon

tableName()

tableName() : \cheetah\string:

Defines the table name for the Team Class.

Returns

\cheetah\string: —

'teams'

fromRow()

fromRow(\mysqli  $db, array  $team) : \cheetah\Model:

Generates a new Team object from a row in the database.

The row must be from the teams database table

Parameters

\mysqli $db
array $team

Returns

\cheetah\Model: —

The generated Team object

toArray()

toArray() : \cheetah\array:

Returns

\cheetah\array: —

The array representation of the Player

toJsonArray()

toJsonArray() : \cheetah\array:

Returns

\cheetah\array: —

The JSON array representation of the Player