Public Member Functions |
| Vote ($oldVoteID="") |
| finalize () |
| setTitle ($title) |
| getTitle () |
| setQuestion ($question) |
| getQuestion () |
| setAnswers ($answerArray) |
| addSlashesToText () |
| getAnswers () |
| setStartdate ($timestamp) |
| getStartdate () |
| setStopdate ($timestamp) |
| getStopdate () |
| getRealStopdate () |
| getCreationdate () |
| getChangedate () |
| setTimespan ($seconds) |
| getTimespan () |
| setMultiplechoice ($multiplechoice) |
| isMultiplechoice () |
| setResultvisibility ($mode) |
| getResultvisibility () |
| setNamesvisibility ($namesvisibility) |
| getNamesvisibility () |
| setAnonymous ($anonymous) |
| isAnonymous () |
| setChangeable ($changeable) |
| isChangeable () |
| isVisible () |
| setVoteID ($objectID) |
| getVoteID () |
| setRangeID ($rangeID) |
| getRangeID () |
| setAuthorID ($authorID) |
| getAuthorID () |
| isInUse () |
| isNew () |
| isActive () |
| isStopped () |
| sortVoteAnswers () |
| getMaxAnswer () |
| getNumberAnswers () |
| getNumberPersons () |
| executeAssociate ($userID, $answerArray) |
| executeStart () |
| executeStop () |
| executeRemove () |
| executeRestart () |
| executeContinue () |
| executeSetVisible ($visibility) |
| executeWrite () |
| readVote () |
| setIsInUse ($isInUse) |
| setState ($state) |
| setCreationdate ($timestamp) |
| setChangedate ($timestamp) |
| getState () |
| checkConsistency () |
| sortVoteAnswerarray ($a, $b) |
| StudipObject ($objectID="") |
| createNewID () |
| getObjectID () |
| setObjectID ($objectID) |
| getAuthor () |
| getFullname () |
| AuthorObject () |
| setAuthorEmail ($email) |
| getAuthorEmail () |
| setAuthorName ($name) |
| getAuthorName () |
| x_instanceof () |
| isError () |
| getErrors () |
| resetErrors () |
| throwError ($errcode, $errstring, $errline=0, $errfile=0, $errtype=ERROR_NORMAL) |
| throwErrorFromClass (&$class) |
| errorHandler ($no, $str, $file, $line, $ctx) |
Static Public Member Functions |
| date2timestamp ($day, $month, $year, $hour=0, $minute=0, $second=0) |
Member Function Documentation
Checks the consostency of the vote (internal!) private
- Exceptions
-
Reimplemented in TestVote.
date2timestamp |
( |
|
$day, |
|
|
|
$month, |
|
|
|
$year, |
|
|
|
$hour = 0 , |
|
|
|
$minute = 0 , |
|
|
|
$second = 0 |
|
) |
| |
|
static |
Checks and transforms a date into a UNIX (r)(tm) timestamp public
- Parameters
-
integer | $day | The day |
integer | $month | The month |
integer | $year | The year |
integer | $hour | The hour (optional) |
integer | $minute | The minute (optional) |
integer | $second | The second (optional) |
- Returns
- integer If an error occurs -> -1. Otherwise the UNIX-timestamp
executeAssociate |
( |
|
$userID, |
|
|
|
$answerArray |
|
) |
| |
Associate a user with an answer or vote in the database (!) public
- Parameters
-
string | $userID | The unique user ID |
array | $answerArray | An array with one or more answers |
- Exceptions
-
Continues the vote in the database (!) public
- Exceptions
-
Removes the vote from the database (!) public
- Exceptions
-
Restarts the vote in the database (!) public
- Exceptions
-
executeSetVisible |
( |
|
$visibility | ) |
|
Sets the visibility of a stopped vote in the database (!) public
- Parameters
-
boolean | $visibility | If YES -> Stopped vote gets visible |
- Exceptions
-
Starts the vote in the database (!) public
- Exceptions
-
Stops the vote in the database (!) public
- Exceptions
-
Writes the vote into the database (!) public
- Exceptions
-
Reimplemented in TestVote.
Gets the answers public
- Returns
- array The answers.
Gets the unique user ID from the owner of the vote public
- Returns
- string The unique user ID
Reimplemented from StudipObject.
Gets the change date public
- Returns
- integer Change date as a UNIX timestamp.
Gets the creation date public
- Returns
- integer Creation date as a UNIX timestamp.
Gets the number of votes from the answer with the most votes public
- Returns
- the number
Gets whether the names of participants will be publicly visible public
- Returns
- boolean
Gets the total number of votes public
- Returns
- the number
Gets the total number of persons who voted public
- Returns
- the number
Gets the question of a vote public
- Returns
- string The question of a vote
Gets the unique range ID from the vote public
- Returns
- string The unique range ID
Reimplemented from StudipObject.
Gets the real stop date as a UNIX-timestamp (e.g. startdate + timespan) public
- Returns
- integer The UNIX-timestamp with the real stopdate
Gets the way how to show the results public
- Returns
- string The mode. See VOTE_RESULTS_*
Gets the start date public
- Returns
- integer Start date as a UNIX timestamp
Gets the internal state of a vote (internal!) private
- Returns
- integer The State. See VOTE_*
Gets the stop date public
- Returns
- integer End date as a UNIX timestamp.
Gets the timespan public
- Returns
- integer The timespan in days
Gets the title of a vote public
- Returns
- string The title of a vote
Gets the unique ID from the vote public
- Returns
- string The unique ID
Checks whether the vote is active public
- Returns
- boolean YES if vote is active
Checks whether the vote is to be linked with a user public
- Returns
- boolean YES if vote is not linked with a user
Checks whether the it´s allowed to change the answer public
- Returns
- boolean YES if it´s allowed to change the answer
Check whether a user had already used this vote public
- Returns
- bollean YES if a user had already used the vote
Checks whether multiple choice is allowed public
- Returns
- boolean If multiple choice is allowed -> YES
Checks whether the vote is new public
- Returns
- boolean YES if vote is new
Checks whether the vote is stopped public
- Returns
- boolean YES if vote is stopped
Checks whether the vote is visible public
- Returns
- boolean YES if vote is visible
Loads an old vote (internal!) private
- Exceptions
-
Reimplemented in TestVote.
setAnonymous |
( |
|
$anonymous | ) |
|
Defines whether the vote is to be linked with a user public
- Parameters
-
boolean | $anonymous | YES if vote is not be linked with a user |
- Exceptions
-
setAnswers |
( |
|
$answerArray | ) |
|
Sets the answers public
- Parameters
-
array | $answerArray | The answer(s) |
- Exceptions
-
Reimplemented in TestVote.
Sets the unique author ID from the vote public
- Parameters
-
string | $authorID | The unique author ID |
Reimplemented from StudipObject.
setChangeable |
( |
|
$changeable | ) |
|
Defines whether it´s allowed for a user to change his/her answer public
- Parameters
-
boolean | $changeable | YES if it´s allowed to change the answer |
- Exceptions
-
setChangedate |
( |
|
$timestamp | ) |
|
Sets the change date (internal!) private
- Parameters
-
integer | $timestamp | The UNIX-timestamp from the change day |
- Exceptions
-
setCreationdate |
( |
|
$timestamp | ) |
|
Sets the create date (internal!) private
- Parameters
-
integer | $timestamp | The UNIX-timestamp from the create day |
- Exceptions
-
Sets isInUse (internal!) private
- Parameters
-
setMultiplechoice |
( |
|
$multiplechoice | ) |
|
Defines whether multiple choice is allowed public
- Parameters
-
boolean | $multiplechoice | YES if multiple choice is allowed |
- Exceptions
-
setNamesvisibility |
( |
|
$namesvisibility | ) |
|
Defines whether the names of participants will be publicly visible public
- Parameters
-
boolean | $namesvisibility | YES if names shall be visible |
- Exceptions
-
Sets the question of a vote public
- Parameters
-
string | $question | The question of a vote |
- Exceptions
-
Sets the unique range ID from the vote public
- Parameters
-
string | $rangeID | The unique range ID |
Reimplemented from StudipObject.
setResultvisibility |
( |
|
$mode | ) |
|
Sets the way how to show the results public
- Parameters
-
integer | $mode | See const VOTE_RESULTS_* |
- Exceptions
-
setStartdate |
( |
|
$timestamp | ) |
|
Sets the start date public
- Parameters
-
integer | $timestamp | The UNIX-timestamp from the start day |
- Exceptions
-
Sets the state (internal!) private
- Parameters
-
integer | $state | The state of the vote. See VOTE_* |
- Exceptions
-
setStopdate |
( |
|
$timestamp | ) |
|
Sets the stop date public
- Parameters
-
integer | $timestamp | The UNIX-timestamp from the end day |
- Exceptions
-
Sets the timespan public
- Parameters
-
integer | $seconds | The timespan in seconds |
- Exceptions
-
Sets the title of a vote public
- Parameters
-
string | $title | The title of a vote |
- Exceptions
-
Sets the unique ID from the vote public
- Parameters
-
string | $objectID | The unique ID |
sortVoteAnswerarray |
( |
|
$a, |
|
|
|
$b |
|
) |
| |
Sorts the answerarray
- Parameters
-
array | $a | first answerarray |
array | $b | second answerarray private |
Sorts the answerarray public
Constructor public
- Parameters
-
string | $oldVoteID | The ID of an existing vote |
- Exceptions
-
Field Documentation
Defines whether the vote is to be linked with a user. private
The possible anwers of the vote. private
The unique userID of the author of the vote private
Defines whether it is allowed to change the answers private
Time of last change. Is set automatically. private
Time of creation. Is set automatically. private
Defines whether a user had already used this vote private
Defines whether multiple choice is allowed. private
Defines whether a user can see the participants of the vote. private
The unique ID of the vote private
The question of the vote. private
The unique range ID of the vote private
integer $resultvisibility |
Defines how to show the result. See const VOTE_RESULTS_* private
Holds the DB-state the state of the vote. See constants VOTE_* private
The title of the vote. private
Defines whether the vote is visible or not private
Holds the VoteDB object public
The documentation for this class was generated from the following file: