Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZQuizGame Class Reference

## Public Member Functions
| __construct ( $id=-1, $fetch=true)
| store ()
| delete ( $catID=-1)
| get ( $id=-1)
| fill (&$quizArray)
| id ()
& | name ()
& | description ()
& | startDate ()
& | stopDate ()
| setName (&$value)
| setDescription (&$value)
| setStartDate (&$date)
| setStopDate (&$date)
| isClosed ()
| isFutureGame ()
& | questions ()
& | question ( $placement)
& | numberOfQuestions ()
& | numberOfPlayers ()
& | openGames ( $offset=0, $limit=20)
& | numberOfOpenGames ()
& | opensNext ( $offset=0, $limit=20)
& | closedGames ( $offset=0, $limit=20)
& | numberOfClosedGames ()

## Static Public Member Functions
static & | getAll ( $offset=0, $limit=20)
static | count ()
static & | startedInPeriod (&$inStartDate, &$inStopDate)
static & | endedInPeriod (&$inStartDate, &$inStopDate)
static & | embracingPeriod (&$inStartDate, &$inStopDate)

## Public Attributes
| $ID
| $Name
| $Description
| $StartDate
| $StopDate

## Detailed Description

! eZQuiz ezquizgame documentation.

Example code:

Definition at line 42 of file ezquizgame.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZQuizGame::__construct | ( |  | $id = `-1`,
|  |  | $fetch = `true`
| ) |  |

Constructs a new eZQuizGame object.

If $id is set the object's values are fetched from the database.

Definition at line 51 of file ezquizgame.php.

References $id, $ID, and fill().

## Member Function Documentation

## ◆ closedGames()

& eZQuizGame::closedGames | ( |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Returns the closed games

Definition at line 469 of file ezquizgame.php.

References $db, $i, $limit, $now, $offset, count(), and eZDB\globalDatabase().

## ◆ count()

static eZQuizGame::count | ( |  | ) |
| static

Returns the total count.

Definition at line 208 of file ezquizgame.php.

References $db, $result, $ret, and eZDB\globalDatabase().

Referenced by closedGames(), embracingPeriod(), endedInPeriod(), get(), getAll(), openGames(), opensNext(), questions(), and startedInPeriod().

## ◆ delete()

eZQuizGame::delete | ( |  | $catID = `-1` | ) |

Deletes a eZQuizGame object from the database.

Definition at line 105 of file ezquizgame.php.

References $db, $ID, $question, $res, eZDB\finish(), eZDB\globalDatabase(), and questions().

## ◆ description()

& eZQuizGame::description | ( |  | ) |

Returns the description of the game.

Definition at line 240 of file ezquizgame.php.

## ◆ embracingPeriod()

static& eZQuizGame::embracingPeriod | ( | & | $inStartDate,
|  | & | $inStopDate
| ) |  |
| static

Returns all the games which embraces this period.

Definition at line 561 of file ezquizgame.php.

References $db, $i, $result, count(), and eZDB\globalDatabase().

## ◆ endedInPeriod()

static& eZQuizGame::endedInPeriod | ( | & | $inStartDate,
|  | & | $inStopDate
| ) |  |
| static

Returns all the games ended within a period.

Definition at line 535 of file ezquizgame.php.

References $db, $i, $result, count(), and eZDB\globalDatabase().

## ◆ fill()

eZQuizGame::fill | ( | & | $quizArray | ) |

Fills in information to the object taken from the array.

Definition at line 156 of file ezquizgame.php.

References $db, eZDB\globalDatabase(), and Name.

Referenced by __construct(), and get().

## ◆ get()

eZQuizGame::get | ( |  | $id = `-1` | ) |

Fetches the object information from the database.

True is retuned if successful, false (0) if not.

Definition at line 130 of file ezquizgame.php.

References $db, $id, $ret, count(), fill(), and eZDB\globalDatabase().

## ◆ getAll()

static& eZQuizGame::getAll | ( |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |
| static

Returns all the categories found in the database.

The categories are returned as an array of eZQuizGame objects.

Definition at line 175 of file ezquizgame.php.

References $db, $i, $limit, $offset, count(), and eZDB\globalDatabase().

## ◆ id()

eZQuizGame::id | ( |  | ) |

Returns the object ID to the game. This is the unique ID stored in the database.

Definition at line 221 of file ezquizgame.php.

References $ID.

## ◆ isClosed()

eZQuizGame::isClosed | ( |  | ) |

Returns true if the game is closed!

Definition at line 298 of file ezquizgame.php.

References $db, $now, $ret, and eZDB\globalDatabase().

## ◆ isFutureGame()

eZQuizGame::isFutureGame | ( |  | ) |

Returns true if the game is in the future!

Definition at line 321 of file ezquizgame.php.

References $db, $now, $ret, and eZDB\globalDatabase().

## ◆ name()

& eZQuizGame::name | ( |  | ) |

Returns the name of the game.

Definition at line 229 of file ezquizgame.php.

References $Name, and Name.

## ◆ numberOfClosedGames()

& eZQuizGame::numberOfClosedGames | ( |  | ) |

Returns the number of closed games

Definition at line 492 of file ezquizgame.php.

References $db, $now, $ret, and eZDB\globalDatabase().

## ◆ numberOfOpenGames()

& eZQuizGame::numberOfOpenGames | ( |  | ) |

Returns the number of open games

Definition at line 429 of file ezquizgame.php.

References $db, $now, $ret, and eZDB\globalDatabase().

## ◆ numberOfPlayers()

& eZQuizGame::numberOfPlayers | ( |  | ) |

Returns the number of players for this quiz game

Definition at line 392 of file ezquizgame.php.

References $db, $result, $ret, and eZDB\globalDatabase().

## ◆ numberOfQuestions()

& eZQuizGame::numberOfQuestions | ( |  | ) |

Returns the number of questions to this quiz game

Definition at line 377 of file ezquizgame.php.

References $db, $result, $ret, and eZDB\globalDatabase().

## ◆ openGames()

& eZQuizGame::openGames | ( |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Returns all the open games

Definition at line 406 of file ezquizgame.php.

References $db, $i, $limit, $now, $offset, count(), and eZDB\globalDatabase().

## ◆ opensNext()

& eZQuizGame::opensNext | ( |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Returns the games opening

Definition at line 446 of file ezquizgame.php.

References $db, $i, $limit, $now, $offset, count(), and eZDB\globalDatabase().

## ◆ question()

& eZQuizGame::question | ( |  | $placement | ) |

Returns a specific question based on the placement (number) The question is returned as eZQuizQuestion objects.

Definition at line 362 of file ezquizgame.php.

References $db, $question, and eZDB\globalDatabase().

## ◆ questions()

& eZQuizGame::questions | ( |  | ) |

Returns every questions to this quiz game The questions is returned as an array of eZQuizQuestion objects.

Definition at line 345 of file ezquizgame.php.

References $db, $i, count(), and eZDB\globalDatabase().

Referenced by delete().

## ◆ setDescription()

eZQuizGame::setDescription | ( | & | $value | ) |

Sets the description.

Definition at line 272 of file ezquizgame.php.

## ◆ setName()

eZQuizGame::setName | ( | & | $value | ) |

Sets the login.

Definition at line 264 of file ezquizgame.php.

References Name.

## ◆ setStartDate()

eZQuizGame::setStartDate | ( | & | $date | ) |

Sets the start date for the game.

Definition at line 280 of file ezquizgame.php.

References $date.

## ◆ setStopDate()

eZQuizGame::setStopDate | ( | & | $date | ) |

Sets the start date for the game.

Definition at line 289 of file ezquizgame.php.

References $date.

## ◆ startDate()

& eZQuizGame::startDate | ( |  | ) |

Returns the start date of the game.

Definition at line 248 of file ezquizgame.php.

References $StartDate.

## ◆ startedInPeriod()

static& eZQuizGame::startedInPeriod | ( | & | $inStartDate,
|  | & | $inStopDate
| ) |  |
| static

Returns all the games started within a period.

Definition at line 508 of file ezquizgame.php.

References $db, $i, $result, count(), and eZDB\globalDatabase().

## ◆ stopDate()

& eZQuizGame::stopDate | ( |  | ) |

Returns the stop date of the game.

Definition at line 256 of file ezquizgame.php.

References $StopDate.

## ◆ store()

eZQuizGame::store | ( |  | ) |

Stores a eZQuizGame object to the database.

Definition at line 70 of file ezquizgame.php.

References $db, $name, $res, eZDB\finish(), eZDB\globalDatabase(), and Name.

## Member Data Documentation

## ◆ $Description

eZQuizGame::$Description

Definition at line 590 of file ezquizgame.php.

## ◆ $ID

eZQuizGame::$ID

Definition at line 588 of file ezquizgame.php.

Referenced by __construct(), delete(), and id().

## ◆ $Name

eZQuizGame::$Name

Definition at line 589 of file ezquizgame.php.

Referenced by name().

## ◆ $StartDate

eZQuizGame::$StartDate

Definition at line 591 of file ezquizgame.php.

Referenced by startDate().

## ◆ $StopDate

eZQuizGame::$StopDate

Definition at line 592 of file ezquizgame.php.

Referenced by stopDate().

The documentation for this class was generated from the following file:

- ezquizgame.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.