1
0
This commit is contained in:
2022-09-21 14:01:45 +02:00
parent 0a30f39eb4
commit cfee4d93d0
349 changed files with 4 additions and 4 deletions

View File

@ -0,0 +1,26 @@
## public static Condorcet::addMethod
### Description
```php
public static Condorcet::addMethod ( string $methodClass ): bool
```
If you create your own Condorcet Algo. You will need it !
##### **methodClass:** *```string```*
The class name implementing your method. The class name includes the namespace it was declared in (e.g. Foo\Bar).
### Return value:
*(```bool```)* True on Success. False on failure.
---------------------------------------
### Related method(s)
* [static Condorcet::isAuthMethod](../Condorcet%20Class/public%20static%20Condorcet--isAuthMethod.md)
* [static Condorcet::getMethodClass](../Condorcet%20Class/public%20static%20Condorcet--getMethodClass.md)

View File

@ -0,0 +1,26 @@
## public static Condorcet::getAuthMethods
### Description
```php
public static Condorcet::getAuthMethods ( [bool $basic = false] ): array
```
Get a list of supported algorithm.
##### **basic:** *```bool```*
Include or not the natural Condorcet base algorithm.
### Return value:
*(```array```)* Populated by method string name. You can use it on getResult ... and others methods.
---------------------------------------
### Related method(s)
* [static Condorcet::isAuthMethod](../Condorcet%20Class/public%20static%20Condorcet--isAuthMethod.md)
* [static Condorcet::getMethodClass](../Condorcet%20Class/public%20static%20Condorcet--getMethodClass.md)

View File

@ -0,0 +1,22 @@
## public static Condorcet::getDefaultMethod
### Description
```php
public static Condorcet::getDefaultMethod ( ): ?string
```
Return the Condorcet static default method.
### Return value:
*(```?string```)* Method name.
---------------------------------------
### Related method(s)
* [static Condorcet::getAuthMethods](../Condorcet%20Class/public%20static%20Condorcet--getAuthMethods.md)
* [static Condorcet::setDefaultMethod](../Condorcet%20Class/public%20static%20Condorcet--setDefaultMethod.md)

View File

@ -0,0 +1,30 @@
## public static Condorcet::getMethodClass
### Description
```php
public static Condorcet::getMethodClass ( string $method ): ?string
```
Return the full class path for a method.
##### **method:** *```string```*
A valid method name.
### Return value:
*(```?string```)* Return null is method not exist.
### Throws:
* ```CondorcetPHP\Condorcet\Throwable\AlgorithmException```
---------------------------------------
### Related method(s)
* [static Condorcet::getAuthMethods](../Condorcet%20Class/public%20static%20Condorcet--getAuthMethods.md)

View File

@ -0,0 +1,26 @@
## public static Condorcet::getVersion
### Description
```php
public static Condorcet::getVersion ( [bool $major = false] ): string
```
Get the library version.
##### **major:** *```bool```*
* true will return : '2.0'
* false will return : '2.0.0'.
### Return value:
*(```string```)* Condorcet PHP version.
---------------------------------------
### Related method(s)
* [Election::getObjectVersion](../Election%20Class/public%20Election--getObjectVersion.md)

View File

@ -0,0 +1,26 @@
## public static Condorcet::isAuthMethod
### Description
```php
public static Condorcet::isAuthMethod ( string $method ): bool
```
Test if a method is in the result set of Condorcet::getAuthMethods.
##### **method:** *```string```*
A valid method name or class.
### Return value:
*(```bool```)* True / False
---------------------------------------
### Related method(s)
* [static Condorcet::getMethodClass](../Condorcet%20Class/public%20static%20Condorcet--getMethodClass.md)
* [static Condorcet::getAuthMethods](../Condorcet%20Class/public%20static%20Condorcet--getAuthMethods.md)

View File

@ -0,0 +1,25 @@
## public static Condorcet::setDefaultMethod
### Description
```php
public static Condorcet::setDefaultMethod ( string $method ): bool
```
Put a new static method by default for the news Condorcet objects.
##### **method:** *```string```*
A valid method name or class.
### Return value:
*(```bool```)* In case of success, return TRUE
---------------------------------------
### Related method(s)
* [static Condorcet::getDefaultMethod](../Condorcet%20Class/public%20static%20Condorcet--getDefaultMethod.md)