Open Journal Systems
3.3.0
|
Static Public Member Functions | |
static | camelCase ($str) |
static | camelCase ($str) |
static | getGatewayClassName ($shortName) |
static | getGatewayClassName ($shortName) |
static | getGatewayShortName ($className) |
static | getGatewayShortName ($className) |
static | initialize ($target, $parameters) |
static | initialize ($target, array $parameters=null) |
static | toFloat ($value) |
static | validateLuhn ($number) |
static | validateLuhn ($number) |
Static Protected Member Functions | |
static | convertToLowercase ($str) |
static | convertToLowercase ($str) |
Helper class
This class defines various static utility functions that are in use throughout the Omnipay system.
Definition at line 16 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
|
static |
Convert a string to camelCase. Strings already in camelCase will not be harmed.
string | $str | The input string |
Definition at line 24 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
References Omnipay\Common\Helper\convertToLowercase().
Referenced by Omnipay\Common\HelperTest\testCamelCase(), Omnipay\Common\HelperTest\testCamelCaseAlreadyCorrect(), and Omnipay\Common\HelperTest\testCamelCaseWithUppercaseValue().
|
static |
Convert a string to camelCase. Strings already in camelCase will not be harmed.
string | $str | The input string |
Definition at line 24 of file vendor/omnipay/common/src/Common/Helper.php.
References Omnipay\Common\Helper\convertToLowercase().
|
staticprotected |
Convert strings with underscores to be all lowercase before camelCase is preformed.
string | $str | The input string |
Definition at line 42 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
Referenced by Omnipay\Common\Helper\camelCase().
|
staticprotected |
Convert strings with underscores to be all lowercase before camelCase is preformed.
string | $str | The input string |
Definition at line 42 of file vendor/omnipay/common/src/Common/Helper.php.
|
static |
Resolve a short gateway name to a full namespaced gateway class.
Class names beginning with a namespace marker () are left intact. Non-namespaced classes are expected to be in the \Omnipay namespace, e.g.:
\Custom\Gateway => \Custom\Gateway \Custom_Gateway => \Custom_Gateway Stripe => \Omnipay\Stripe\Gateway PayPal\Express => \Omnipay\PayPal\ExpressGateway PayPal_Express => \Omnipay\PayPal\ExpressGateway
string | $shortName | The short gateway name |
Definition at line 127 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
Referenced by Omnipay\Common\GatewayFactory\create(), Omnipay\Common\GatewayFactory\find(), Omnipay\Common\HelperTest\testGetGatewayClassNameExistingNamespace(), Omnipay\Common\HelperTest\testGetGatewayClassNameExistingNamespaceUnderscore(), Omnipay\Common\HelperTest\testGetGatewayClassNamePartialNamespace(), Omnipay\Common\HelperTest\testGetGatewayClassNameSimple(), and Omnipay\Common\HelperTest\testGetGatewayClassNameUnderscoreNamespace().
|
static |
Resolve a short gateway name to a full namespaced gateway class.
Class names beginning with a namespace marker () are left intact. Non-namespaced classes are expected to be in the \Omnipay namespace, e.g.:
\Custom\Gateway => \Custom\Gateway \Custom_Gateway => \Custom_Gateway Stripe => \Omnipay\Stripe\Gateway PayPal\Express => \Omnipay\PayPal\ExpressGateway PayPal_Express => \Omnipay\PayPal\ExpressGateway
string | $shortName | The short gateway name |
Definition at line 128 of file vendor/omnipay/common/src/Common/Helper.php.
|
static |
Resolve a gateway class to a short name.
The short name can be used with GatewayFactory as an alias of the gateway class, to create new instances of a gateway.
Definition at line 99 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
Referenced by Omnipay\Common\AbstractGateway\getShortName(), Omnipay\Common\HelperTest\testGetGatewayShortNameCustomGateway(), Omnipay\Common\HelperTest\testGetGatewayShortNameSimple(), Omnipay\Common\HelperTest\testGetGatewayShortNameSimpleLeadingSlash(), Omnipay\Common\HelperTest\testGetGatewayShortNameUnderscore(), and Omnipay\Common\HelperTest\testGetGatewayShortNameUnderscoreLeadingSlash().
|
static |
Resolve a gateway class to a short name.
The short name can be used with GatewayFactory as an alias of the gateway class, to create new instances of a gateway.
Definition at line 100 of file vendor/omnipay/common/src/Common/Helper.php.
|
static |
Initialize an object with a given array of parameters
Parameters are automatically converted to camelCase. Any parameters which do not match a setter on the target object are ignored.
mixed | $target | The object to set parameters on |
array | $parameters | An array of parameters to set |
Definition at line 81 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
Referenced by Omnipay\Common\Item\initialize(), Omnipay\Common\initialize(), Omnipay\Common\AbstractGateway\initialize(), Omnipay\Common\Message\AbstractRequest\initialize(), Omnipay\Common\CreditCard\initialize(), Omnipay\Common\HelperTest\testInitializeCallsSetters(), Omnipay\Common\HelperTest\testInitializeIgnoresInvalidParameters(), Omnipay\Common\HelperTest\testInitializeIgnoresNull(), and Omnipay\Common\HelperTest\testInitializeIgnoresString().
|
static |
Initialize an object with a given array of parameters
Parameters are automatically converted to camelCase. Any parameters which do not match a setter on the target object are ignored.
mixed | $target | The object to set parameters on |
array | $parameters | An array of parameters to set |
Definition at line 82 of file vendor/omnipay/common/src/Common/Helper.php.
|
static |
Definition at line 152 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
Referenced by Omnipay\Common\HelperTest\testToFloatFromBoolean(), Omnipay\Common\HelperTest\testToFloatFromFloat(), Omnipay\Common\HelperTest\testToFloatFromInt(), Omnipay\Common\HelperTest\testToFloatFromStringDecimal(), Omnipay\Common\HelperTest\testToFloatFromStringEmptyDecimal(), Omnipay\Common\HelperTest\testToFloatFromStringEmptyIntegerPart(), Omnipay\Common\HelperTest\testToFloatFromStringInt(), Omnipay\Common\HelperTest\testToFloatFromStringIntNegative(), Omnipay\Common\HelperTest\testToFloatFromStringRedunantZeroes(), Omnipay\Common\HelperTest\testToFloatFromStringTwoDecimalPoints(), Omnipay\Common\HelperTest\testToFloatFromStringWrongDecimalPoints(), and Omnipay\Common\Message\AbstractRequest\toFloat().
|
static |
Validate a card number according to the Luhn algorithm.
string | $number | The card number to validate |
Definition at line 62 of file lib/vendor/omnipay/common/src/Omnipay/Common/Helper.php.
Referenced by Omnipay\Common\HelperTest\testValidateLuhnInvalid(), Omnipay\Common\HelperTest\testValidateLuhnNull(), Omnipay\Common\HelperTest\testValidateLuhnValid(), and Omnipay\Common\CreditCard\validate().
|
static |
Validate a card number according to the Luhn algorithm.
string | $number | The card number to validate |
Definition at line 63 of file vendor/omnipay/common/src/Common/Helper.php.