Open Journal Systems  3.3.0
Omnipay\Common\GatewayFactory Class Reference

Public Member Functions

 all ()
 
 all ()
 
 create ($class, ClientInterface $httpClient=null, HttpRequest $httpRequest=null)
 
 create ($class, ClientInterface $httpClient=null, HttpRequest $httpRequest=null)
 
 find ()
 
 getSupportedGateways ()
 
 register ($className)
 
 register ($className)
 
 replace (array $gateways)
 
 replace (array $gateways)
 

Detailed Description

Omnipay Gateway Factory class

This class abstracts a set of gateways that can be independently registered, accessed, and used.

Note that static calls to the Omnipay class are routed to this class by the static call router (__callStatic) in Omnipay.

Example:

// Create a gateway for the PayPal ExpressGateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('ExpressGateway');

See also
Omnipay\Omnipay

Omnipay Gateway Factory class

This class abstracts a set of gateways that can be independently registered, accessed, and used.

Note that static calls to the Omnipay class are routed to this class by the static call router (__callStatic) in Omnipay.

Example:

// Create a gateway for the PayPal ExpressGateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('ExpressGateway');

Definition at line 31 of file lib/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php.

Member Function Documentation

◆ all() [1/2]

Omnipay\Common\GatewayFactory::all ( )

All available gateways

Returns
array An array of gateway names

Definition at line 47 of file vendor/omnipay/common/src/Common/GatewayFactory.php.

◆ all() [2/2]

Omnipay\Common\GatewayFactory::all ( )

All available gateways

Returns
array An array of gateway names

Definition at line 48 of file lib/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php.

Referenced by Omnipay\Common\GatewayFactory\find().

◆ create() [1/2]

Omnipay\Common\GatewayFactory::create (   $class,
ClientInterface  $httpClient = null,
HttpRequest  $httpRequest = null 
)

Create a new gateway instance

Parameters
string$classGateway name
ClientInterface | null$httpClientA HTTP Client implementation
HttpRequest | null$httpRequestA Symfony HTTP Request implementation
Exceptions
RuntimeExceptionIf no such gateway is found
Returns
GatewayInterface An object of class $class is created and returned

Definition at line 83 of file vendor/omnipay/common/src/Common/GatewayFactory.php.

References Omnipay\Common\Helper\getGatewayClassName().

◆ create() [2/2]

Omnipay\Common\GatewayFactory::create (   $class,
ClientInterface  $httpClient = null,
HttpRequest  $httpRequest = null 
)

Create a new gateway instance

Parameters
string$classGateway name
ClientInterface | null$httpClientA Guzzle HTTP Client implementation
HttpRequest | null$httpRequestA Symfony HTTP Request implementation
Exceptions
RuntimeExceptionIf no such gateway is found
Returns
GatewayInterface An object of class $class is created and returned

Definition at line 103 of file lib/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php.

References Omnipay\Common\Helper\getGatewayClassName().

◆ find()

Omnipay\Common\GatewayFactory::find ( )

Automatically find and register all officially supported gateways

Returns
array An array of gateway names

Definition at line 80 of file lib/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php.

References Omnipay\Common\GatewayFactory\all(), Omnipay\Common\Helper\getGatewayClassName(), and Omnipay\Common\GatewayFactory\getSupportedGateways().

◆ getSupportedGateways()

Omnipay\Common\GatewayFactory::getSupportedGateways ( )

Get a list of supported gateways which may be available

Returns
array

Definition at line 119 of file lib/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php.

Referenced by Omnipay\Common\GatewayFactory\find().

◆ register() [1/2]

Omnipay\Common\GatewayFactory::register (   $className)

Register a new gateway

Parameters
string$classNameGateway name

Definition at line 67 of file vendor/omnipay/common/src/Common/GatewayFactory.php.

◆ register() [2/2]

Omnipay\Common\GatewayFactory::register (   $className)

Register a new gateway

Parameters
string$classNameGateway name

Definition at line 68 of file lib/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php.

◆ replace() [1/2]

Omnipay\Common\GatewayFactory::replace ( array  $gateways)

Replace the list of available gateways

Parameters
array$gatewaysAn array of gateway names

Definition at line 57 of file vendor/omnipay/common/src/Common/GatewayFactory.php.

◆ replace() [2/2]

Omnipay\Common\GatewayFactory::replace ( array  $gateways)

Replace the list of available gateways

Parameters
array$gatewaysAn array of gateway names

Definition at line 58 of file lib/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php.


The documentation for this class was generated from the following file: