Documentation

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 = []

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
throws
CRM_Core_Exception
Return values
string|null

flushProcessors()

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
throws
CRM_Core_Exception
Return values
CRM_Core_Payment|null

getByProcessor()

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
throws
CRM_Core_Exception
Return values
CRM_Core_Payment|null

        
On this page

Search results