PHP Class PayPal\Core\PayPalConfigManager

PayPalConfigManager loads the SDK configuration file and hands out appropriate config params to other classes
Show file Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Methods

Method Description
__clone ( ) Disabling __clone call
addConfigFromIni ( string $fileName ) Add Configuration from configuration.ini files
addConfigs ( array $configs = [] ) If a configuration exists in both arrays, then the element from the first array will be used and the matching key's element from the second array will be ignored.
get ( string $searchKey ) : array Simple getter for configuration params If an exact match for key is not found, does a "contains" search on the key
getConfigHashmap ( ) returns the config file hashmap
getIniPrefix ( string | null $userId = null ) : array | string Utility method for handling account configuration return config key corresponding to the API userId passed in
getInstance ( ) Returns the singleton object

Private Methods

Method Description
__construct ( ) Private Constructor

Method Details

__clone() public method

Disabling __clone call
public __clone ( )

addConfigFromIni() public method

Add Configuration from configuration.ini files
public addConfigFromIni ( string $fileName )
$fileName string

addConfigs() public method

If a configuration exists in both arrays, then the element from the first array will be used and the matching key's element from the second array will be ignored.
public addConfigs ( array $configs = [] )
$configs array

get() public method

Simple getter for configuration params If an exact match for key is not found, does a "contains" search on the key
public get ( string $searchKey ) : array
$searchKey string
return array

getConfigHashmap() public method

returns the config file hashmap
public getConfigHashmap ( )

getIniPrefix() public method

If $userId is null, returns config keys corresponding to all configured accounts
public getIniPrefix ( string | null $userId = null ) : array | string
$userId string | null
return array | string

getInstance() public static method

Returns the singleton object
public static getInstance ( )