pm_ApiCli
in package
Gateway for execution of CLI utilities
Tags
Table of Contents
- RESULT_CODE = 4
- RESULT_EXCEPTION = 5
- RESULT_FULL = 1
- RESULT_STDERR = 3
- RESULT_STDOUT = 2
- call() : array<string|int, mixed>|int|string
- Execute CLI utility (from set provided by panel)
- callDomain() : array<string|int, mixed>|int|string
- Execute specified command as domain user
- callSbin() : array<string|int, mixed>|int|string
- Execute privileged CLI utility
Constants
RESULT_CODE
public
mixed
RESULT_CODE
= 4
RESULT_EXCEPTION
public
mixed
RESULT_EXCEPTION
= 5
RESULT_FULL
public
mixed
RESULT_FULL
= 1
RESULT_STDERR
public
mixed
RESULT_STDERR
= 3
RESULT_STDOUT
public
mixed
RESULT_STDOUT
= 2
Methods
call()
Execute CLI utility (from set provided by panel)
public
static call(string $command[, array<string|int, mixed> $args = [] ][, int $result = 5 ][, array<string|int, mixed> $env = [] ][, string $stdin = '' ]) : array<string|int, mixed>|int|string
Parameters
- $command : string
- $args : array<string|int, mixed> = []
- $result : int = 5
- $env : array<string|int, mixed> = []
- $stdin : string = ''
Tags
Return values
array<string|int, mixed>|int|string —callDomain()
Execute specified command as domain user
public
static callDomain(pm_Domain $domain, string $workingDir, string $command[, array<string|int, mixed> $args = [] ][, int $result = 5 ][, array<string|int, mixed> $env = [] ][, string $stdin = '' ]) : array<string|int, mixed>|int|string
Parameters
- $domain : pm_Domain
- $workingDir : string
- $command : string
- $args : array<string|int, mixed> = []
- $result : int = 5
- $env : array<string|int, mixed> = []
- $stdin : string = ''
Tags
Return values
array<string|int, mixed>|int|string —callSbin()
Execute privileged CLI utility
public
static callSbin(string $command[, array<string|int, mixed> $args = [] ][, int $result = 5 ][, array<string|int, mixed> $env = [] ][, string $stdin = '' ]) : array<string|int, mixed>|int|string
Parameters
- $command : string
- $args : array<string|int, mixed> = []
- $result : int = 5
- $env : array<string|int, mixed> = []
- $stdin : string = ''