com.woltlab.wcf.data.message.poll.data.message.poll
This class represents an option of a poll.
DatabaseObject | --PollOption
| Return | Name |
|---|---|
PollOption |
__construct(array $row, Poll $poll)
|
void |
addVote()
|
static integer |
compareResult(PollOption $optionA, PollOption $optionB)
|
integer |
getBarWidth()
|
double |
getPercent()
|
boolean |
isChecked()
|
void |
removeVote()
|
public PollOption __construct(array $row, Poll $poll)
Creates a new PollOption object.
$row - resultset with option data form database $poll - the poll of this option Redefinition of: DatabaseObject::__construct()
public void addVote()
Increases the number of votes by one.
public static integer compareResult(PollOption $optionA, PollOption $optionB)
Compares the votes of two poll options.
$optionA $optionB public integer getBarWidth()
Returns the bar width of this option.
public double getPercent()
Returns the percent value of this option.
public boolean isChecked()
Returns true, if this option is checked.
public void removeVote()
Decreases the number of votes by one.
DatabaseObject::__construct(), DatabaseObject::handleData(), DatabaseObject::sort(), DatabaseObject::__get()