Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

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

## Public Member Functions
| __construct ( $id=-1)
| store ()
| delete ( $catID=-1)
| get ( $id=-1)
| fill (&$alternativeArray)
| getAll ( $offset=0, $limit=20)
| count ()
| id ()
| name ()
| isCorrect ()
| question ()
| setName (&$value)
| setIsCorrect ( $value)
| questionID ()
| setQuestion (&$question)
| answers ()

## Public Attributes
| $ID
| $Name
| $IsCorrect
| $Question

## Detailed Description

! eZQuiz eZQuizAlternative documentation.

Example code:

Definition at line 41 of file ezquizalternative.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZQuizAlternative::__construct | ( |  | $id = `-1` | ) |

Constructs a new eZQuizAlternative object.

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

Definition at line 50 of file ezquizalternative.php.

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

## Member Function Documentation

## ◆ answers()

eZQuizAlternative::answers | ( |  | ) |

Returns every answers to this quiz alternative The alternatives is returned as an array of eZQuizAnswer objects.

Definition at line 290 of file ezquizalternative.php.

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

## ◆ count()

eZQuizAlternative::count | ( |  | ) |

Returns the total count.

Definition at line 198 of file ezquizalternative.php.

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

Referenced by answers(), get(), and getAll().

## ◆ delete()

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

Deletes a eZQuizAlternative object from the database.

Definition at line 105 of file ezquizalternative.php.

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

## ◆ fill()

eZQuizAlternative::fill | ( | & | $alternativeArray | ) |

Fills in information to the object taken from the array.

Definition at line 164 of file ezquizalternative.php.

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

Referenced by __construct(), and get().

## ◆ get()

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

Fetches the object information from the database.

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

Definition at line 132 of file ezquizalternative.php.

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

## ◆ getAll()

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

Returns all the categories found in the database.

The categories are returned as an array of eZQuizAlternative objects.

Definition at line 178 of file ezquizalternative.php.

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

## ◆ id()

eZQuizAlternative::id | ( |  | ) |

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

Definition at line 211 of file ezquizalternative.php.

References $ID.

## ◆ isCorrect()

eZQuizAlternative::isCorrect | ( |  | ) |

Returns the score of the game.

Definition at line 227 of file ezquizalternative.php.

## ◆ name()

eZQuizAlternative::name | ( |  | ) |

Returns the name of the game.

Definition at line 219 of file ezquizalternative.php.

References Name.

## ◆ question()

eZQuizAlternative::question | ( |  | ) |

Returns the question object of the game.

Definition at line 238 of file ezquizalternative.php.

References $Question.

## ◆ questionID()

eZQuizAlternative::questionID | ( |  | ) |

Gets the question id

Definition at line 265 of file ezquizalternative.php.

References $ret.

## ◆ setIsCorrect()

eZQuizAlternative::setIsCorrect | ( |  | $value | ) |

Sets the score.

Definition at line 254 of file ezquizalternative.php.

## ◆ setName()

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

Sets the login.

Definition at line 246 of file ezquizalternative.php.

References Name.

## ◆ setQuestion()

eZQuizAlternative::setQuestion | ( | & | $question | ) |

Returns the name of the game.

Definition at line 280 of file ezquizalternative.php.

References $question.

## ◆ store()

eZQuizAlternative::store | ( |  | ) |

Stores a eZQuizAlternative object to the database.

Definition at line 71 of file ezquizalternative.php.

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

## Member Data Documentation

## ◆ $ID

eZQuizAlternative::$ID

Definition at line 303 of file ezquizalternative.php.

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

## ◆ $IsCorrect

eZQuizAlternative::$IsCorrect

Definition at line 305 of file ezquizalternative.php.

## ◆ $Name

eZQuizAlternative::$Name

Definition at line 304 of file ezquizalternative.php.

## ◆ $Question

eZQuizAlternative::$Question

Definition at line 306 of file ezquizalternative.php.

Referenced by question().

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

- ezquizalternative.php

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