Klassenvorlage für eine API
Für die genaue Funktionsweise der API siehe Wiki
| copyright | (c) Copyright 2008-2013 by ManuAdminMod (http://www.manuadminmod.de) |
|---|---|
| license | Creative Commons BY-NC-ND 3.0 (http://www.creativecommons.org/licenses/by-nc-nd/3.0/) |
| author | manu (manu@manuadminmod.de) |
| since | 1.0 |
| version | 1.0 |
__construct(\Daemon\Core\Core $Core, \Daemon\API\Adapter $Adapter, \Daemon\API\Converter $Converter)
answerCommandAsError(\Daemon\API\Request $Request, string $errorstring, int $errorcode)
\Daemon\API\Request
string
int
\BadMethodCallException |
|---|
answerCommandAsSuccess(\Daemon\API\Request $Request, mixed $answer)
commandExists(string $command) : boolean
string
booleandoTick() : void
Sollte einmal pro Hauptschleifendurchlauf aufgerufen werden
\Daemon\API\BadMethodCallException |
|---|
getRegisteredCommands() : string[]
string[]Namen der CommandsregisterExtension(\Daemon\API\APIExtension $Extension) : void
Wirft eine InvalidArgumentException wenn die Registrierung fehlschlägt, z.B. weil ein Command bereits registriert ist.
\Daemon\API\APIExtension
\InvalidArgumentException |
|---|
$Adapter : \Daemon\API\Adapter
$Converter : \Daemon\API\Converter
$Core : \Daemon\Core\Core
$Extensions : \Daemon\API\Extension[]
$extensionRegister : int[]
$waitingForAnswer : boolean