WithGames
in
Interface for objects that contain games
Tags
Table of Contents
- addGameContainer() : WithGames
- Add a child container for games
- getGameContainer() : GameContainer
- Get the container for games
- getGames() : array<string|int, Game>
- Get all tournament games
- setGameAutoincrementId() : WithGames
- Sets a new autoincrement value (start) for the generated games
- setResults() : Game|null
- Set the game's results
Methods
addGameContainer()
Add a child container for games
public
addGameContainer(GameContainer $container) : WithGames
Parameters
- $container : GameContainer
Return values
WithGames —getGameContainer()
Get the container for games
public
getGameContainer() : GameContainer
Return values
GameContainer —getGames()
Get all tournament games
public
getGames() : array<string|int, Game>
Return values
array<string|int, Game> —setGameAutoincrementId()
Sets a new autoincrement value (start) for the generated games
public
setGameAutoincrementId(int $id) : WithGames
Parameters
- $id : int
-
Id - probably from the database
Tags
Return values
WithGames —setResults()
Set the game's results
public
setResults(array<string|int, int> $results) : Game|null
Results is an array of [teamId => teamScore] key-value pairs. This method will look for a game with given teams and try to set the first not played.
Parameters
- $results : array<string|int, int>
-
array of [teamId => teamScore] key-value pairs