Service
Service
Task wrapper responsible for launching and supervising service endpoints.
class Service extends \Hazaar\Warlock\Agent\TaskExtends: Hazaar\Warlock\Agent\Task
Properties
childConfig
public array $childConfigType: array
name
Service name to run on the server.
public string $name = 'Unnamed Service'Type: string
enabled
Whether this service task is currently enabled.
public bool $enabled = trueType: bool
info
public array $infoType: array
delay
Startup delay in seconds.
public int $delayType: int
loglevel
Log level applied to service output.
public LogLevel $loglevel = 'LogLevel'Type: Hazaar\Warlock\Enum\LogLevel
Methods
__construct
The $config array is forwarded verbatim to the running service as its own configuration,
public __construct(Main $agent, Logger $log, array $config): voidso it is kept as a raw array here; an Options instance is built from it internally to read the handful of fields this task wrapper itself cares about (delay, timezone).
Parameters
| Parameter | Type | Description |
|---|---|---|
$agent | Hazaar\Warlock\Agent\Main | |
$log | Hazaar\Warlock\Logger | |
$config | array |
run
Sends a service-start request to the server.
public run(): selfReturns: self
processCommand
Handles service-task specific protocol commands.
protected processCommand(PacketType $command, mixed $payload): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$command | Hazaar\Warlock\Enum\PacketType | |
$payload | mixed |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000