Skip to content

public Election::setStateToVote

Read it at the source

Description

php
public Election->setStateToVote ( ): true

Force the election to get back to state 2. It is not necessary to use this method. The election knows how to manage its phase changes on its own. But it is a way to clear the cache containing the results of the methods.

If you are on state 1 (candidate registering), it's will close this state and prepare election to get firsts votes. If you are on state 3. The method result cache will be clear, but not the pairwise. Which will continue to be updated dynamically.

Return value

(true) Always True.

Throws:

  • CondorcetPHP\Condorcet\Throwable\NoCandidatesException
  • CondorcetPHP\Condorcet\Throwable\ResultRequestedWithoutVotesException

Released under the MIT License.