Process
About 4 min
Process
- Full name:
\Hazaar\Warlock\Process
- This class is an Abstract class
Properties
start
public int $start
state
public ?int $state
conn
protected \Hazaar\Warlock\Interfaces\Connection $conn
id
protected ?string $id
application
protected \Hazaar\Application $application
protocol
protected \Hazaar\Warlock\Protocol $protocol
subscriptions
protected array<string,callable> $subscriptions
options
private static array<string,(null|string)[]> $options
- This property is static.
opt
private static array<int,string> $opt
- This property is static.
Methods
__construct
public __construct(\Hazaar\Application $application, \Hazaar\Warlock\Protocol $protocol, ?string $guid = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$application | \Hazaar\Application | |
$protocol | \Hazaar\Warlock\Protocol | |
$guid | ?string |
__destruct
public __destruct(): mixed
__processCommand
protected __processCommand(string $command, mixed $payload = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$command | string | |
$payload | mixed |
__kv_send_recv
private __kv_send_recv(string $command, array $data): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$command | string | |
$data | array |
send
public send(string $command, mixed $payload = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$command | string | |
$payload | mixed |
recv
public recv(mixed& $payload = null, int $tv_sec = 3, int $tv_usec): null|bool|string
Parameters:
Parameter | Type | Description |
---|---|---|
$payload | mixed | |
$tv_sec | int | |
$tv_usec | int |
ping
public ping(bool $waitPong = false): bool|string
Parameters:
Parameter | Type | Description |
---|---|---|
$waitPong | bool |
subscribe
public subscribe(string $event, string $callback, array<string,mixed> $filter = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$event | string | |
$callback | string | |
$filter | array<string,mixed> |
unsubscribe
public unsubscribe(string $event): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$event | string |
trigger
public trigger(string $event, mixed $data = null, bool $echoSelf = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$event | string | |
$data | mixed | |
$echoSelf | bool |
log
public log(int $level, string[]|string $message, ?string $name = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$level | int | |
$message | string[]|string | |
$name | ?string |
debug
public debug(mixed $data, ?string $name = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$data | mixed | |
$name | ?string |
spawn
public spawn(string $service, array $params = []): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$service | string | |
$params | array |
kill
public kill(string $service): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$service | string |
status
public status(): false|\stdClass
runDelay
public runDelay(int $delay, callable $callable, ?\Hazaar\Map $params = null, ?string $tag = null, bool $overwrite = false): bool|string
Parameters:
Parameter | Type | Description |
---|---|---|
$delay | int | |
$callable | callable | |
$params | ?\Hazaar\Map | |
$tag | ?string | |
$overwrite | bool |
interval
public interval(int $seconds, string $callable, ?\Hazaar\Map $params = null, ?string $tag = null, bool $overwrite = false): bool|string
Parameters:
Parameter | Type | Description |
---|---|---|
$seconds | int | |
$callable | string | |
$params | ?\Hazaar\Map | |
$tag | ?string | |
$overwrite | bool |
schedule
public schedule(\Hazaar\Date $when, string $callable, ?\Hazaar\Map $params = null, ?string $tag = null, bool $overwrite = false): bool|string
Parameters:
Parameter | Type | Description |
---|---|---|
$when | \Hazaar\Date | |
$callable | string | |
$params | ?\Hazaar\Map | |
$tag | ?string | |
$overwrite | bool |
cancel
public cancel(string $taskID): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$taskID | string |
startService
public startService(string $name): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
stopService
public stopService(string $name): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
service
public service(string $name): bool|string
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
get
public get(string $key, ?string $namespace = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$namespace | ?string |
set
public set(string $key, mixed $value, ?int $timeout = null, ?string $namespace = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$value | mixed | |
$timeout | ?int | |
$namespace | ?string |
has
public has(string $key, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$namespace | ?string |
del
public del(string $key, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$namespace | ?string |
clear
public clear(?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$namespace | ?string |
list
public list(?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$namespace | ?string |
pull
public pull(string $key, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$namespace | ?string |
push
public push(string $key, mixed $value, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$value | mixed | |
$namespace | ?string |
pop
public pop(string $key, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$namespace | ?string |
shift
public shift(string $key, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$namespace | ?string |
unshift
public unshift(string $key, mixed $value, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$value | mixed | |
$namespace | ?string |
incr
public incr(string $key, ?int $step = null, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$step | ?int | |
$namespace | ?string |
decr
public decr(string $key, ?int $step = null, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$step | ?int | |
$namespace | ?string |
keys
public keys(?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$namespace | ?string |
vals
public vals(?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$namespace | ?string |
count
public count(string $key, ?string $namespace = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$namespace | ?string |
runner
public static runner(\Hazaar\Application $application, array $argv = null): int
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$application | \Hazaar\Application | |
$argv | array |
getServiceClass
public static getServiceClass(string $serviceName, \Hazaar\Application $application, \Hazaar\Warlock\Protocol $protocol, bool $remote = false): false|\Hazaar\Warlock\Service
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$serviceName | string | |
$application | \Hazaar\Application | |
$protocol | \Hazaar\Warlock\Protocol | |
$remote | bool |
setErrorHandler
protected setErrorHandler(string $methodName): ?callable
Parameters:
Parameter | Type | Description |
---|---|---|
$methodName | string |
setExceptionHandler
protected setExceptionHandler(string $methodName): ?callable
Parameters:
Parameter | Type | Description |
---|---|---|
$methodName | string |
connect
protected connect(\Hazaar\Warlock\Protocol $protocol, ?string $guid = null): \Hazaar\Warlock\Interfaces\Connection|false
Parameters:
Parameter | Type | Description |
---|---|---|
$protocol | \Hazaar\Warlock\Protocol | |
$guid | ?string |
disconnect
protected disconnect(): void
connected
protected connected(): bool
makeCallable
protected makeCallable(callable|\Closure $callable): array<string,mixed>
Parameters:
Parameter | Type | Description |
---|---|---|
$callable | callable|\Closure |
sendExec
private sendExec(string $command, mixed $data, callable $callable, ?\Hazaar\Map $params = null, ?string $tag = null, bool $overwrite = false): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$command | string | |
$data | mixed | |
$callable | callable | |
$params | ?\Hazaar\Map | |
$tag | ?string | |
$overwrite | bool |
getopt
private static getopt(): array<string,mixed>
- This method is static.
showHelp
private static showHelp(): int
- This method is static.
Automatically generated on 2024-11-14