Method |
Description |
|
PEAR_Config ( $user_file = '', $system_file = '', $ftp_file = false, $strict = true ) |
Constructor. |
|
_addConfigVars ( $class, $vars ) : true | PEAR_Error |
|
|
_decodeInput ( &$data ) : boolean |
Decodes/unscrambles configuration data after reading from files. |
|
_encodeOutput ( &$data ) : boolean |
Encodes/scrambles configuration data before writing to files. |
|
_getChannelValue ( $key, $layer, $channel ) : mixed |
Returns a channel-specific configuration value, prioritizing layers as per the
layers property. |
|
_lazyChannelSetup ( $uselayer = false ) |
|
|
_prependPath ( $path, $prepend ) |
|
|
_readConfigDataFrom ( $file ) : array |
Reads configuration data from a file and returns the parsed data
in an array. |
|
_setupChannels ( ) |
Reads the existing configurations and creates the _channels array from it |
|
apiVersion ( ) |
|
|
arrayMergeRecursive ( $arr2, $arr1 ) : array |
|
|
definedBy ( $key, $returnchannel = false ) : string | array |
Tells what config layer that gets to define a key. |
|
deleteChannel ( $channel ) |
|
|
get ( $key, $layer = null, $channel = false ) : mixed |
Returns a configuration value, prioritizing layers as per the
layers property. |
|
getConfFile ( string $layer ) |
Gets the file used for storing the config for a layer |
|
getDefaultChannel ( $layer = null ) : string | false |
Retrieve the default channel. |
|
getDefaultConfigFiles ( ) |
Return the default locations of user and system configuration files |
|
getDocs ( $key ) : string |
Get the documentation for a config value. |
|
getFTP ( ) : PEAR_FTP | false |
The ftp server is set in {@link readFTPConfigFile()}. It exists only if a
remote configuration file has been specified |
|
getGroup ( $key ) : string |
Get the parameter group for a config key. |
|
getGroupKeys ( string $group ) : array |
Get the list of the parameters in a group. |
|
getGroups ( ) : array |
Get the list of parameter groups. |
|
getKeys ( ) : array |
Get all the current config keys. |
|
getLayers ( ) : array |
Returns the layers defined (except the 'default' one) |
|
getPrompt ( $key ) : string |
Get the short documentation for a config value. |
|
getREST ( $version, $options = [] ) : PEAR_REST |
|
|
getRegistry ( $use = null ) : PEAR_Registry |
|
|
getSetValues ( $key ) : array |
Get the list of allowed set values for a config value. Returns
NULL for config values that are not sets. |
|
getType ( $key ) : string |
Get the type of a config value. |
|
isDefined ( $key ) : boolean |
Tells whether a given key exists as a config value. |
|
isDefinedLayer ( $layer ) : boolean |
Tells whether a given config layer exists. |
|
mergeConfigFile ( $file, $override = true, $layer = 'user', $strict = true ) : boolean |
Merges data into a config layer from a file. Does the same
thing as readConfigFile, except it does not replace all
existing values in the config layer. |
|
noRegistry ( ) |
|
|
readConfigFile ( $file = null, $layer = 'user', $strict = true ) : boolean |
Reads configuration data from a file. All existing values in
the config layer are discarded and replaced with data from the
file. |
|
readFTPConfigFile ( $path ) : true | PEAR_Error |
|
|
remove ( $key, $layer = 'user', $channel = null ) : boolean |
Remove the a config key from a specific config layer. |
|
removeLayer ( $layer ) : boolean |
Temporarily remove an entire config layer. USE WITH CARE! |
|
set ( $key, $value, $layer = 'user', $channel = false ) : boolean |
Set a config value in a specific layer (defaults to 'user'). |
|
setChannels ( $channels, $merge = false ) : boolean |
Set the list of channels. |
|
setInstallRoot ( $root ) |
|
|
setRegistry ( &$reg, $layer = 'user' ) : boolean |
This is to allow customization like the use of installroot |
|
singleton ( $user_file = '', $system_file = '', $strict = true ) : object |
Static singleton method. If you want to keep only one instance
of this class in use, this method will give you a reference to
the last created PEAR_Config object if one exists, or create a
new object. |
|
store ( $layer = 'user', $data = null ) : boolean |
Stores configuration data in a layer. |
|
validConfiguration ( ) : boolean |
Determine whether any configuration files have been detected, and whether a
registry object can be retrieved from this configuration. |
|
writeConfigFile ( $file = null, $layer = 'user', $data = null ) : boolean |
Writes data into a config layer from a file. |
|