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