System
in package
Class System
Table of Contents
Properties
- $cache : array<string|int, mixed>
- $singleton : System
Methods
- checkProcessorConfig() : string|null
- Execute checkConfig() on the payment processor Object.
- flushProcessors() : mixed
- Flush processors from static cache.
- getByClass() : CRM_Core_Payment|null
- Sometimes we want to instantiate a processor object when no valid instance exists (eg. when uninstalling a processor).
- getById() : CRM_Core_Payment
- Get payment processor by it's ID.
- getByName() : CRM_Core_Payment|null
- getByProcessor() : CRM_Core_Payment|null
- Starting from the processor as an array retrieve the processor as an object.
- singleton() : System
Properties
$cache
private
array<string|int, mixed>
$cache
= []
$singleton
private
static System
$singleton
Methods
checkProcessorConfig()
Execute checkConfig() on the payment processor Object.
public
checkProcessorConfig(array<string|int, mixed> $processor) : string|null
This function creates a new instance of the processor object and returns the output of checkConfig
Parameters
- $processor : array<string|int, mixed>
Tags
Return values
string|nullflushProcessors()
Flush processors from static cache.
public
flushProcessors() : mixed
This is particularly used for tests.
getByClass()
Sometimes we want to instantiate a processor object when no valid instance exists (eg. when uninstalling a processor).
public
getByClass(string $className) : CRM_Core_Payment|null
This function does not load instance specific details for the processor.
Parameters
- $className : string
Tags
Return values
CRM_Core_Payment|nullgetById()
Get payment processor by it's ID.
public
getById(int $id) : CRM_Core_Payment
Parameters
- $id : int
Tags
Return values
CRM_Core_PaymentgetByName()
public
getByName(string $name, bool $is_test) : CRM_Core_Payment|null
Parameters
- $name : string
- $is_test : bool
Tags
Return values
CRM_Core_Payment|nullgetByProcessor()
Starting from the processor as an array retrieve the processor as an object.
public
getByProcessor(array<string|int, mixed> $processor[, bool $force = FALSE ]) : CRM_Core_Payment|null
If there is no valid configuration it will not be retrieved.
Parameters
- $processor : array<string|int, mixed>
- $force : bool = FALSE
-
Override the config check. This is required in uninstall as no valid instances exist but will deliberately not work with any valid processors.
Tags
Return values
CRM_Core_Payment|nullsingleton()
public
static singleton() : System