Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZVote Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| get ( $id=-1)
| getAll ( $id)
| pollID ()
| choiceID ()
| votingIP ()
| id ()
| userID ()
| setVotingIP ( $value)
| setPollID ( $value)
| setChoiceID ( $value)
| setUserID ( $value)

## Static Public Member Functions
| isVoted ( $userID, $pollID)
| ipHasVoted ( $IP, $pollID)

## Public Attributes
| $ID
| $IP
| $PollID
| $ChoiceIP
| $UserID

## Detailed Description

! eZPoll The eZVote class handles the options for votes.

The eZVote class handles vote options. The class has function for storing and fetching from the database.

Example code:

See also
  eZVoteChoice eZVote

Definition at line 45 of file ezvote.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructor a new eZVote object. Retrieves the data from the database if a valid id is given as an argument.

Definition at line 51 of file ezvote.php.

References $id, and $ID.

## Member Function Documentation

## ◆ choiceID()

eZVote::choiceID | ( |  | ) |

Returns the pollid of the vote.

Definition at line 149 of file ezvote.php.

## ◆ get()

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

Fetches the vote object from the database.

Definition at line 96 of file ezvote.php.

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

## ◆ getAll()

eZVote::getAll | ( |  | $id | ) |

Fetches the vote id from the database. And returns a array of eZVote objects.

Definition at line 123 of file ezvote.php.

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

## ◆ id()

eZVote::id | ( |  | ) |

Returns the ID of the vote.

Definition at line 166 of file ezvote.php.

References $ID.

## ◆ ipHasVoted()

eZVote::ipHasVoted | ( |  | $IP,
|  |  | $pollID
| ) |  |
| static

Check if the user already have voted. If voted, return true.

Definition at line 238 of file ezvote.php.

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

## ◆ isVoted()

eZVote::isVoted | ( |  | $userID,
|  |  | $pollID
| ) |  |
| static

Check if the user already have voted. If voted, return true.

Definition at line 216 of file ezvote.php.

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

## ◆ pollID()

eZVote::pollID | ( |  | ) |

Returns the pollid of the vote.

Definition at line 141 of file ezvote.php.

References $PollID.

## ◆ setChoiceID()

eZVote::setChoiceID | ( |  | $value | ) |

Sets the Pollid of the vote.

Definition at line 199 of file ezvote.php.

## ◆ setPollID()

eZVote::setPollID | ( |  | $value | ) |

Sets the Pollid of the vote.

Definition at line 191 of file ezvote.php.

## ◆ setUserID()

eZVote::setUserID | ( |  | $value | ) |

Sets the ChoiceID of the vote.

Definition at line 207 of file ezvote.php.

## ◆ setVotingIP()

eZVote::setVotingIP | ( |  | $value | ) |

Sets the IP of the vote.

Definition at line 183 of file ezvote.php.

## ◆ store()

eZVote::store | ( |  | ) |

Stores a eZVote object to the database.

Definition at line 63 of file ezvote.php.

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

## ◆ userID()

eZVote::userID | ( |  | ) |

Returns the ID of the vote.

Definition at line 174 of file ezvote.php.

References $userID.

## ◆ votingIP()

eZVote::votingIP | ( |  | ) |

Returns the IP of the vote.

Definition at line 158 of file ezvote.php.

References $IP.

## Member Data Documentation

## ◆ $ChoiceIP

eZVote::$ChoiceIP

Definition at line 259 of file ezvote.php.

## ◆ $ID

eZVote::$ID

Definition at line 256 of file ezvote.php.

Referenced by __construct(), and id().

## ◆ $IP

eZVote::$IP

Definition at line 257 of file ezvote.php.

Referenced by votingIP().

## ◆ $PollID

eZVote::$PollID

Definition at line 258 of file ezvote.php.

Referenced by pollID().

## ◆ $UserID

eZVote::$UserID

Definition at line 260 of file ezvote.php.

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

- ezvote.php

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