\Blackpulp\MinistryPlatformConfig

This class handles retrieving configuration values from MinistryPlatform.

It loads the configuration data from MinistryPlatform's "Configuration Settings" table.

Summary

Methods
Properties
Constants
__construct()
updateConfigurationSettings()
getStoredProcedure()
setStoredProcedure()
getConfig()
getApplicationCode()
setApplicationCode()
getConfigValue()
No public properties found
No constants found
setConfig()
$stored_procedure
$application_code
$config
N/A
No private methods found
No private properties found
N/A

Properties

$stored_procedure

$stored_procedure : string

the stored procedure used to fetch the configuration settings

Type

string

$application_code

$application_code : string

The Application Code name that needs to be fetched from MinistryPlatform.

Type

string

$config

$config : \StoredProcedureResult

The stored procedure result of configuration settings

Type

\StoredProcedureResult

Methods

__construct()

__construct(string  $application_code = "COMMON", string  $stored_procedure = "api_Common_GetConfigurationSettings") 

Instantiate a Config object and load the Configuration data.

Parameters

string $application_code

The MP Application_Code value you want to get values for.

string $stored_procedure

Provides an override option for the stored procedure used to fetch the config data from MinistryPlatform in the event you've written a custom stored procedure.

updateConfigurationSettings()

updateConfigurationSettings() : \Blackpulp\MinistryPlatform\Config

Update $this->config by fetching fresh data from MinistryPlatform.

Returns

\Blackpulp\MinistryPlatform\Config

getStoredProcedure()

getStoredProcedure() : string

Gets the stored procedure used to fetch the configuration settings.

Returns

string

setStoredProcedure()

setStoredProcedure(string  $stored_procedure) : self

Sets the stored procedure used to fetch the configuration settings.

Parameters

string $stored_procedure

the stored procedure

Returns

self

getConfig()

getConfig() : array

Gets the configuration settings result object.

Returns

array

getApplicationCode()

getApplicationCode() : mixed

Gets the value of application_code.

Returns

mixed

setApplicationCode()

setApplicationCode(mixed  $application_code) : self

Sets the value of application_code.

Parameters

mixed $application_code

the application code

Returns

self

getConfigValue()

getConfigValue(string  $key) : string

Retrieve the value of a specific configuration Key name

Parameters

string $key

The name of the Key

Returns

string

setConfig()

setConfig(\StoredProcedureResult  $config) : self

Sets the The array of configuration settings.

Parameters

\StoredProcedureResult $config

The config object

Returns

self