Properties

$A

$A : string

A

Type

string

$LOADED_VALUES

$LOADED_VALUES : string

LOADED_VALUES

Type

string

$settings

$settings : string

settings

Type

string

$C

$C : string

C

Type

string

$CONFIG_PATH

$CONFIG_PATH : string

CONFIG_PATH

Type

string

$CACHE_PATH

$CACHE_PATH : string

CACHE_PATH

Type

string

Methods

__construct()

__construct(array  $args = NULL) : \JCORE\LOAD\bool;

CACHEABLE CONFIG.

if we don't have a cache with and API we're looking @ an I/O hit for all the config files use XDEBUG [or equiv] to VERIFY your relative execution times [cache vs file load] (these can change under varying types of load)

$args["CSN"] $args["INSTANCE"] $args["CACHE_SERIALIZATION"] $args["UNSERIALIZE_TYPE"]

if no chache source nothing else to do... otherwise set defaults and over-ride if the arg is passed $this->settings["CACHE_SERIALIZATION"] = 'JSON'; $this->settings["UNSERIALIZE_TYPE"] = 'ARRAY'; $this->settings["IMPLEMENTATION"] = 'STATIC'; ["IMPLEMENTATION"] != 'STATIC' we either use an instantiated class or fail to no cache

Parameters

array $args

Returns

\JCORE\LOAD\bool;

setCache()

setCache(  $args = NULL) : mixed

setCache

Parameters

$args

Returns

mixed

checkCompiled()

checkCompiled(  $args = null) : boolean

checkCompiled

Parameters

$args

Returns

boolean

loadConfigFile()

loadConfigFile(  $args = null) : array

loadConfigFile

Parameters

$args

Returns

array

loadConfig()

loadConfig(  $LOAD_ID = '') : null

DESCRIPTOR: loads the config file and returns a value of true if all good

loads everything in this->CONFIG_PATH/*{global,local}.php by default LOAD_ID is the directory path

Parameters

$LOAD_ID

Returns

null

saveConfig()

saveConfig(  $fileList) : null

saveConfig

Parameters

$fileList

Returns

null

MergeConfig()

MergeConfig(  $settings,   $config) : null

lifted from example by andyidol at gmail dot com here http://php.net/manual/en/function.array-merge-recursive.php to address disfunctionality of array_merge and array_merge_recursive

Parameters

$settings
$config

Returns

null

getSetting()

getSetting(  $LOAD_ID = null,   $SECTION_NAME = null,   $SETTING_NAME = NULL) : null

DESCRIPTOR: gets the setting.

treat args as setting[LOAD_ID][SECTION_NAME][SETTING_NAME] LOAD_ID is the directory path LOAD_ID only will return all vars defined in the file SECTION_NAME [section] name in the ".ini" SECTION_NAME, LOAD_ID only will return the whole section SETTING_NAME setting under [section] in the ".ini"

Parameters

$LOAD_ID
$SECTION_NAME
$SETTING_NAME

Returns

null

getConstants()

getConstants(string  $section = "user") : boolean

DESCRIPTOR: .

loads the ini internally and returns a value of true if all good returns the defined constants array with the "categories" flag $section is the "category" returned "user" is default other options: internal, date, libxml, openssl, pcre, zlib, calendar, hash, filter, ftp, gmp, iconv, standard, sockets, exif, tokenizer, xml, curl,dom, gd, imap, ldap, mbstring, mcrypt, mhash, mysql, mysqli pgsql, posix, snmp, soap

Parameters

string $section

Returns

boolean

preHookCache()

preHookCache(  $LOAD_ID) : mixed

DESCRIPTOR: Checks the cache if the value is set cache args are set in the constructor

Parameters

$LOAD_ID

Returns

mixed

postHookCache()

postHookCache(  $args) : mixed

DESCRIPTOR: Checks the cache if the value is set args["KEY"] args["DATA"] args["CACHE_SERIALIZATION"] args["UNSERIALIZE_TYPE"]

Parameters

$args

Returns

mixed