PHP Class ManagerAPI, Halite

Show file Open project: HaliteChallenge/Halite Class Usage Examples

Public Methods

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

Protected Methods

Method 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

Method 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 method

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

botFile() protected method

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

botHash() protected method

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

compile() protected method

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

game() protected method

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

task() protected method

Delegate a task to a workers
protected task ( )