Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZQuizScore Class Reference

## Public Member Functions
| __construct ( $id=-1, $fetch=true)
| store ()
| delete ( $catID=-1)
| get ( $id=-1)
| getUserGame ( $user, $game)
| fill (&$scoreArray)
| getAll ( $offset=0, $limit=20)
| count ()
| id ()
| user ()
| game ()
| setUser (&$user)
| setGame (&$game)
| setTotalScore ( $score)
| totalScore ()
| setLastQuestion ( $question)
| setNextQuestion ( $question)
| lastQuestion ()
| nextQuestion ()
| setFinishedGame ( $finished=true)
| isFinishedGame ()
| scores (&$game)
| highScore (&$game)
| getAllByGame (&$game, $offset=0, $limit=20)
| countAllByGame (&$game)
| getAllByUser (&$user, $offset=0, $limit=20)
| countAllByUser (&$user)
| getAllSavedByUser (&$user, $offset=0, $limit=20, $latestOnly=true)
| countAllSavedByUser (&$user, $latestOnly=true)

## Public Attributes
| $ID
| $User
| $Game
| $TotalScore
| $LastQuestion
| $FinishedGame

## Detailed Description

! eZQuiz eZQuizScore documentation.

Example code:

Definition at line 42 of file ezquizscore.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructs a new eZQuizScore object.

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

Definition at line 51 of file ezquizscore.php.

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

## Member Function Documentation

## ◆ count()

eZQuizScore::count | ( |  | ) |

Returns the total count.

Definition at line 223 of file ezquizscore.php.

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

Referenced by get(), getAll(), getAllByGame(), getAllByUser(), getAllSavedByUser(), getUserGame(), and scores().

## ◆ countAllByGame()

eZQuizScore::countAllByGame | ( | & | $game | ) |

Returns the number of players of one game.

Definition at line 428 of file ezquizscore.php.

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

## ◆ countAllByUser()

eZQuizScore::countAllByUser | ( | & | $user | ) |

Returns the count of games this user has participated in.

Definition at line 475 of file ezquizscore.php.

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

## ◆ countAllSavedByUser()

eZQuizScore::countAllSavedByUser | ( | & | $user,
|  |  | $latestOnly = `true`
| ) |  |

Returns the count of saved games this user has.

Definition at line 529 of file ezquizscore.php.

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

## ◆ delete()

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

Deletes a eZQuizScore object from the database.

Definition at line 106 of file ezquizscore.php.

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

## ◆ fill()

eZQuizScore::fill | ( | & | $scoreArray | ) |

Fills in information to the object taken from the array.

Definition at line 186 of file ezquizscore.php.

References $db, and eZDB\globalDatabase().

Referenced by __construct(), get(), and getUserGame().

## ◆ game()

eZQuizScore::game | ( |  | ) |

Returns the game of the score.

Definition at line 252 of file ezquizscore.php.

References $Game.

## ◆ get()

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

Fetches the object information from the database.

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

Definition at line 123 of file ezquizscore.php.

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

## ◆ getAll()

eZQuizScore::getAll | ( |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Returns all the scores found in the database.

The scores are returned as an array of eZQuizScore objects.

Definition at line 202 of file ezquizscore.php.

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

## ◆ getAllByGame()

eZQuizScore::getAllByGame | ( | & | $game,
|  |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Returns all the scores found in the database for one game.

The scores are returned as an array of eZQuizScore objects.

Definition at line 402 of file ezquizscore.php.

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

## ◆ getAllByUser()

eZQuizScore::getAllByUser | ( | & | $user,
|  |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Returns all the scores found in the database for one user.

The scores are returned as an array of eZQuizScore objects.

Definition at line 450 of file ezquizscore.php.

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

## ◆ getAllSavedByUser()

eZQuizScore::getAllSavedByUser | ( | & | $user,
|  |  | $offset = `0`,
|  |  | $limit = `20`,
|  |  | $latestOnly = `true`
| ) |  |

Returns all the saved scores found in the database for one user.

The scores are returned as an array of eZQuizScore objects.

Definition at line 496 of file ezquizscore.php.

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

## ◆ getUserGame()

eZQuizScore::getUserGame | ( |  | $user,
|  |  | $game
| ) |  |

Fetches the object information from the database.

This function uses the user id and the game id to fetch the info.

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

Definition at line 153 of file ezquizscore.php.

References $db, $game, $ret, $user, $userID, count(), fill(), and eZDB\globalDatabase().

## ◆ highScore()

eZQuizScore::highScore | ( | & | $game | ) |

This function returns one score as the high scorer of a game.

Definition at line 382 of file ezquizscore.php.

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

## ◆ id()

eZQuizScore::id | ( |  | ) |

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

Definition at line 236 of file ezquizscore.php.

References $ID.

## ◆ isFinishedGame()

eZQuizScore::isFinishedGame | ( |  | ) |

Returns true if this is a finished game.

Definition at line 344 of file ezquizscore.php.

References $ret.

## ◆ lastQuestion()

eZQuizScore::lastQuestion | ( |  | ) |

Gets the last question

Definition at line 311 of file ezquizscore.php.

References $LastQuestion.

## ◆ nextQuestion()

eZQuizScore::nextQuestion | ( |  | ) |

Gets the next question number

Definition at line 319 of file ezquizscore.php.

References $LastQuestion, and $ret.

## ◆ scores()

eZQuizScore::scores | ( | & | $game | ) |

This function returns all the scores for a game.

Definition at line 358 of file ezquizscore.php.

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

## ◆ setFinishedGame()

eZQuizScore::setFinishedGame | ( |  | $finished = `true` | ) |

Sets the game finished

Definition at line 329 of file ezquizscore.php.

## ◆ setGame()

eZQuizScore::setGame | ( | & | $game | ) |

Sets the game

Definition at line 269 of file ezquizscore.php.

References $game.

## ◆ setLastQuestion()

eZQuizScore::setLastQuestion | ( |  | $question | ) |

Sets the last question

Definition at line 294 of file ezquizscore.php.

References $question.

## ◆ setNextQuestion()

eZQuizScore::setNextQuestion | ( |  | $question | ) |

Sets the next question to be answere

Definition at line 302 of file ezquizscore.php.

References $question.

## ◆ setTotalScore()

eZQuizScore::setTotalScore | ( |  | $score | ) |

Sets the score

Definition at line 278 of file ezquizscore.php.

References $score.

## ◆ setUser()

eZQuizScore::setUser | ( | & | $user | ) |

Sets the user

Definition at line 260 of file ezquizscore.php.

References $user.

## ◆ store()

eZQuizScore::store | ( |  | ) |

Stores a eZQuizScore object to the database.

Definition at line 70 of file ezquizscore.php.

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

## ◆ totalScore()

eZQuizScore::totalScore | ( |  | ) |

Gets the score

Definition at line 286 of file ezquizscore.php.

References $TotalScore.

## ◆ user()

eZQuizScore::user | ( |  | ) |

Returns the user of the score.

Definition at line 244 of file ezquizscore.php.

References $User.

## Member Data Documentation

## ◆ $FinishedGame

eZQuizScore::$FinishedGame

Definition at line 559 of file ezquizscore.php.

## ◆ $Game

eZQuizScore::$Game

Definition at line 556 of file ezquizscore.php.

Referenced by game().

## ◆ $ID

eZQuizScore::$ID

Definition at line 554 of file ezquizscore.php.

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

## ◆ $LastQuestion

eZQuizScore::$LastQuestion

Definition at line 558 of file ezquizscore.php.

Referenced by lastQuestion(), and nextQuestion().

## ◆ $TotalScore

eZQuizScore::$TotalScore

Definition at line 557 of file ezquizscore.php.

Referenced by totalScore().

## ◆ $User

eZQuizScore::$User

Definition at line 555 of file ezquizscore.php.

Referenced by user().

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

- ezquizscore.php

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