Skip to content

Reference

phil/poll
TypeKindRole
Phil\Poll\BallotKindenumsingle, multiple, ranked
Phil\Poll\PollRulesfinal readonly classWhat a ballot may hold: single(), multiple(), ranked(), of(), has(), ballot(), MAX_OPTIONS, MAX_OPTION_LENGTH
Phil\Poll\Ballotfinal readonly classThe choices of one voter: of(), isAbstention()
Phil\Poll\Resultfinal readonly classA count: method, ballots, abstentions, standings, rounds, winners(), standingOf()
Phil\Poll\Standingfinal readonly classWhere one option finished: option, score, place
Phil\Poll\Roundfinal readonly classOne round of an instant runoff: tallies, exhausted, eliminated
Phil\Poll\Tallyfinal readonly classThe ballots one option holds in a round: option, votes
Phil\Poll\CountingMethodsfinal readonly classThe methods of an application by name: defaults(), defaultFor(), get(), has(), namesFor(), count()
Phil\Poll\Contract\CountingMethodinterfaceA way of counting: name(), supports(), count()
Phil\Poll\Counting\ChoiceCountfinal readonly classchoices: plurality and approval
Phil\Poll\Counting\InstantRunofffinal readonly classinstant_runoff: rounds and transfers
Phil\Poll\Counting\Bordafinal readonly classborda: points by rank
Phil\Poll\Counting\Schulzefinal readonly classschulze: strongest paths
Phil\Poll\Exception\PollExceptioninterfaceEvery exception of the library
Phil\Poll\Exception\InvalidPollfinal classRules, a kind of ballot or a method the library cannot work with
Phil\Poll\Exception\InvalidBallotfinal classA ballot that breaks the rules of its poll
Phil\Poll\Exception\UnknownCountingMethodfinal classA method asked for by a name none answers to

Phil\Poll\Counting\Places, Choices and BallotGroups are internal: the places of the standings, the choices as option indexes and the grouping of identical rankings.