PHP Class ManagerAPI, Halite

Afficher le fichier Open project: HaliteChallenge/Halite Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $request ) Init database, sanitize parameters, and check if worker is valid

Méthodes protégées

Méthode Description
botFile ( ) Allow workers to download and post bot files
botHash ( ) Allow workers to get the hash of a bot file so that they know that they downloaded the file correctly
compile ( ) Allow worker to post the result of their compilation
game ( ) Allow workers to post the result of their game
task ( ) Delegate a task to a workers

Private Methods

Méthode Description
getAPIKey ( )
getTrueskillMatchQuality ( $rankingValues )
isValidWorker ( ) Checks HTTP parameters and request IP to make sure that the client provided a valid API key

Method Details

__construct() public méthode

Init database, sanitize parameters, and check if worker is valid
public __construct ( $request )

botFile() protected méthode

Allow workers to download and post bot files
protected botFile ( )

botHash() protected méthode

Allow workers to get the hash of a bot file so that they know that they downloaded the file correctly
protected botHash ( )

compile() protected méthode

Allow worker to post the result of their compilation
protected compile ( )

game() protected méthode

Allow workers to post the result of their game
protected game ( )

task() protected méthode

Delegate a task to a workers
protected task ( )