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--parseCandidates.md

1.2 KiB

public Election::parseCandidates

Description

public Election->parseCandidates ( string $input [, bool $isFile = false] ): array

Import candidate from a text source.

input: string

String or valid path to a text file.

isFile: bool

If true, the input is evaluated as path to a text file.

Return value:

(array) List of newly registered candidate object. Count it for checking if all candidates have been correctly registered.

Throws:

  • CondorcetPHP\Condorcet\Throwable\CandidateExistsException
  • CondorcetPHP\Condorcet\Throwable\VoteMaxNumberReachedException


Examples and explanation