class System

Class System

Methods

static System
singleton()

No description

CRM_Core_Payment|NULL
getByProcessor(array $processor, bool $force = FALSE)

Starting from the processor as an array retrieve the processor as an object.

getById(int $id)

Get payment processor by it's ID.

getByName(string $name, bool $is_test)

No description

flushProcessors()

Flush processors from static cache.

CRM_Core_Payment|NULL
getByClass(string $className)

Sometimes we want to instantiate a processor object when no valid instance exists (eg. when uninstalling a processor).

Details

at line 24
static System singleton()

Return Value

System

at line 45
CRM_Core_Payment|NULL getByProcessor(array $processor, bool $force = FALSE)

Starting from the processor as an array retrieve the processor as an object.

If there is no valid configuration it will not be retrieved.

Parameters

array $processor
bool $force Override the config check. This is required in uninstall as no valid instances exist but will deliberately not work with any valid processors.

Return Value

CRM_Core_Payment|NULL

Exceptions

CRM_Core_Exception

at line 83
CRM_Core_Payment|NULL getById(int $id)

Get payment processor by it's ID.

Parameters

int $id

Return Value

CRM_Core_Payment|NULL

Exceptions

CiviCRM_API3_Exception

at line 98
CRM_Core_Payment|NULL getByName(string $name, bool $is_test)

Parameters

string $name
bool $is_test

Return Value

CRM_Core_Payment|NULL

Exceptions

CiviCRM_API3_Exception

at line 108
flushProcessors()

Flush processors from static cache.

This is particularly used for tests.

at line 126
CRM_Core_Payment|NULL getByClass(string $className)

Sometimes we want to instantiate a processor object when no valid instance exists (eg. when uninstalling a processor).

This function does not load instance specific details for the processor.

Parameters

string $className

Return Value

CRM_Core_Payment|NULL

Exceptions

CiviCRM_API3_Exception