ExternalBatch
in package
Class ExternalBatch
Table of Contents
Constants
- POLL_INTERVAL = 10000
- The time to wait when polling for process status (microseconds).
Properties
- $apiCalls : array<string|int, mixed>
- $apiResults : array<string|int, mixed>
- $defaultParams : mixed
- $env : mixed
- $processes : array<string|int, mixed>
- $root : mixed
- $settingsPath : mixed
Methods
- __construct() : mixed
- addCall() : ExternalBatch
- addEnv() : static
- createProcess() : Process
- getResult() : array<string|int, mixed>
- getResults() : array<string|int, mixed>
- getRoot() : string
- getRunningCount() : int
- getSettingsPath() : string
- isSupported() : bool
- Determine if the local environment supports running API calls externally.
- setRoot() : mixed
- setSettingsPath() : mixed
- start() : static
- Run all the API calls concurrently.
- wait() : mixed
Constants
POLL_INTERVAL
The time to wait when polling for process status (microseconds).
public
mixed
POLL_INTERVAL
= 10000
Properties
$apiCalls
protected
array<string|int, mixed>
$apiCalls
Array(int $idx => array $apiCall).
$apiResults
protected
array<string|int, mixed>
$apiResults
Array(int $idx => array $apiResult).
$defaultParams
protected
mixed
$defaultParams
$env
protected
mixed
$env
$processes
protected
array<string|int, mixed>
$processes
Array(int $idx => Process $process).
$root
protected
mixed
$root
$settingsPath
protected
mixed
$settingsPath
Methods
__construct()
public
__construct([array<string|int, mixed> $defaultParams = [] ]) : mixed
Parameters
- $defaultParams : array<string|int, mixed> = []
-
Default values to merge into any API calls.
addCall()
public
addCall(string $entity, string $action[, array<string|int, mixed> $params = [] ]) : ExternalBatch
Parameters
- $entity : string
- $action : string
- $params : array<string|int, mixed> = []
Return values
ExternalBatchaddEnv()
public
addEnv(array<string|int, mixed> $env) : static
Parameters
- $env : array<string|int, mixed>
-
List of environment variables to add.
Return values
staticcreateProcess()
public
createProcess(array<string|int, mixed> $apiCall) : Process
Parameters
- $apiCall : array<string|int, mixed>
-
Array with keys: entity, action, params.
Tags
Return values
ProcessgetResult()
public
getResult([int $idx = 0 ]) : array<string|int, mixed>
Parameters
- $idx : int = 0
Return values
array<string|int, mixed>getResults()
public
getResults() : array<string|int, mixed>
Return values
array<string|int, mixed>getRoot()
public
getRoot() : string
Return values
stringgetRunningCount()
public
getRunningCount() : int
Return values
int —The number of running processes.
getSettingsPath()
public
getSettingsPath() : string
Return values
stringisSupported()
Determine if the local environment supports running API calls externally.
public
isSupported() : bool
Return values
boolsetRoot()
public
setRoot(string $root) : mixed
Parameters
- $root : string
setSettingsPath()
public
setSettingsPath(string $settingsPath) : mixed
Parameters
- $settingsPath : string
start()
Run all the API calls concurrently.
public
start() : static
Tags
Return values
staticwait()
public
wait() : mixed