1.2 KiB
1.2 KiB
public Vote::__construct
Description
public Vote->__construct ( array|string $ranking [, array|string|null $tags = null , ?float $ownTimestamp = null , ?CondorcetPHP\Condorcet\Election $electionContext = null] )
Build a vote object.
ranking: array|string
Equivalent to Vote::setRanking method.
tags: array|string|null
Equivalent to Vote::addTags method.
ownTimestamp: ?float
Set your own timestamp metadata on Ranking.
electionContext: ?CondorcetPHP\Condorcet\Election
Try to convert directly your candidates from sting input" to Candidate object of one election.
Throws:
CondorcetPHP\Condorcet\Throwable\VoteInvalidFormatException