\cheetahPlayer

Class Player Models a player from the players table

Summary

Methods
Properties
Constants
__construct()
tableName()
fromRow()
toArray()
toJsonArray()
$id
$team
$name
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 player in the database

$team

$team : \cheetah\Team:

Type

\cheetah\Team: — The team with which the player is currently affiliated

$name

$name : \cheetah\string:

Type

\cheetah\string: — The name of the player

Methods

__construct()

__construct(\cheetah\int  $id, \cheetah\Team  $team, \cheetah\string  $name) 

Player constructor.

Parameters

\cheetah\int $id
\cheetah\Team $team
\cheetah\string $name

tableName()

tableName() : \cheetah\string:

Defines the table name for the Player Class.

Returns

\cheetah\string: —

'players'

fromRow()

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

Generates a Player object from an associative array representing a row in the players table in the database

Parameters

\mysqli $db
array $row

Returns

\cheetah\Model: —

The generated Player object

toArray()

toArray() : \cheetah\array:

Returns

\cheetah\array: —

The array representation of the Match

toJsonArray()

toJsonArray() : \cheetah\array:

Returns

\cheetah\array: —

The JSON array representation of the Match