1.2 KiB
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