You are here

public function Mongodb_VoteStorage::addVote in Voting API 8.3

Same name and namespace in other branches
  1. 7.3 votingapi.api.php \Mongodb_VoteStorage::addVote()

Save a vote in the database.

Parameters

$vote: instance of VotingApi_Vote.

File

./votingapi.api.php, line 154
Provides hook documentation for the VotingAPI module.

Class

Mongodb_VoteStorage

Code

public function addVote(&$vote) {
  mongodb_collection('votingapi_vote')
    ->insert($vote);
}