Control
Less than 1 minute
Control
Control class for Warlock
This class creates a connection to the Warlock server from within a Hazaar application allowing the application to send triggers or schedule tasks for delayed execution.
Properties
serverConfig
public Config $serverConfig
cmd
private string $cmd
pidfile
private string $pidfile
guid
public string $guid
instance
private array $instance
Methods
__construct
public __construct(?bool $autostart, array $serverConfig = [], ?string $instance_key, bool $require_connect = true): void
Parameters
Parameter | Type | Description |
---|---|---|
$autostart | bool | |
$serverConfig | array | |
$instance_key | string | |
$require_connect | bool |
getInstance
public getInstance(?bool $autostart, array $config = [], bool $require_connect = true): Control
Parameters
Parameter | Type | Description |
---|---|---|
$autostart | bool | |
$config | array | |
$require_connect | bool |
isRunning
public isRunning(): bool
start
public start(?int $timeout): bool
Parameters
Parameter | Type | Description |
---|---|---|
$timeout | int |
stop
public stop(): bool
connect
protected connect(Protocol $protocol, ?string $guid): void
Parameters
Parameter | Type | Description |
---|---|---|
$protocol | Protocol | |
$guid | string |
Generated by Hazaar API Doc Generator