class ExternalBatch

Class ExternalBatch

Constants

POLL_INTERVAL

The time to wait when polling for process status (microseconds).

Properties

protected array $apiCalls
protected $defaultParams
protected $root
protected $settingsPath
protected $env
protected array $processes
protected array $apiResults

Methods

__construct(array $defaultParams = array())

No description

addCall(string $entity, string $action, array $params = array())

No description

addEnv(array $env)

No description

start()

Run all the API calls concurrently.

int
getRunningCount()

No description

wait()

No description

array
getResults()

No description

array
getResult(int $idx)

No description

bool
isSupported()

Determine if the local environment supports running API calls externally.

Process
createProcess(array $apiCall)

No description

string
getRoot()

No description

setRoot(string $root)

No description

string
getSettingsPath()

No description

setSettingsPath(string $settingsPath)

No description

Details

at line 49
__construct(array $defaultParams = array())

Parameters

array $defaultParams Default values to merge into any API calls.

at line 68
ExternalBatch addCall(string $entity, string $action, array $params = array())

Parameters

string $entity
string $action
array $params

Return Value

ExternalBatch

at line 84
ExternalBatch addEnv(array $env)

Parameters

array $env List of environment variables to add.

Return Value

ExternalBatch

at line 95
ExternalBatch start()

Run all the API calls concurrently.

Return Value

ExternalBatch

Exceptions

CRM_Core_Exception

at line 108
int getRunningCount()

Return Value

int The number of running processes.

at line 118
wait()

at line 150
array getResults()

Return Value

array

at line 158
array getResult(int $idx)

Parameters

int $idx

Return Value

array

at line 168
bool isSupported()

Determine if the local environment supports running API calls externally.

Return Value

bool

at line 185
Process createProcess(array $apiCall)

Parameters

array $apiCall Array with keys: entity, action, params.

Return Value

Process

Exceptions

CRM_Core_Exception

at line 226
string getRoot()

Return Value

string

at line 233
setRoot(string $root)

Parameters

string $root

at line 240
string getSettingsPath()

Return Value

string

at line 247
setSettingsPath(string $settingsPath)

Parameters

string $settingsPath