1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__serveur-vote-lalis/include/Condorcet/Documentation/Election Class/public Election--removeCandidates.md

1.3 KiB

public Election::removeCandidates

Description

public Election->removeCandidates ( CondorcetPHP\Condorcet\Candidate|array|string $candidates_input ): array

Remove candidates from an election.

Please note: You can't remove candidates after the first vote. An exception will be thrown.

candidates_input: CondorcetPHP\Condorcet\Candidate|array|string
  • String matching candidate name
  • CondorcetPHP\Condorcet\Candidate object
  • Array populated by CondorcetPHP\Condorcet\Candidate
  • Array populated by string matching candidate name.

Return value:

(array) List of removed CondorcetPHP\Condorcet\Candidate object.

Throws:

  • CondorcetPHP\Condorcet\Throwable\CandidateDoesNotExistException
  • CondorcetPHP\Condorcet\Throwable\VotingHasStartedException


Examples and explanation