Class: PEAR_Config
Source Location: /PEAR-1.7.1/PEAR/Config.php
PEAR
|
--PEAR_Config
This is a class for storing configuration data, keeping track of which are system-defined, user-defined or defaulted.
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
PEAR_Config (Constructor) [line 592]
PEAR_Config PEAR_Config(
[string
$user_file = ''], [string
$system_file = ''], [bool
$ftp_file = false], [bool
$strict = true])
|
|
Constructor.
Parameters:
apiVersion [line 2025]
arrayMergeRecursive [line 936]
array arrayMergeRecursive(
array
$arr2, array
$arr1)
|
|
Parameters:
definedBy [line 1927]
string|array definedBy(
string
$key, [boolean
$returnchannel = false])
|
|
Tells what config layer that gets to define a key.
Parameters:
deleteChannel [line 863]
void deleteChannel(
$channel)
|
|
Parameters:
get [line 1315]
mixed get(
string
$key, [
$layer = null], [
$channel = false])
|
|
Returns a configuration value, prioritizing layers as per the layers property.
Parameters:
getConfFile [line 1091]
void getConfFile(
string
$layer)
|
|
Gets the file used for storing the config for a layer
Parameters:
getDefaultChannel [line 1279]
string|false getDefaultChannel(
[string
$layer = null])
|
|
Retrieve the default channel. On startup, channels are not initialized, so if the default channel is not pear.php.net, then initialize the config.
Parameters:
getDefaultConfigFiles [line 656]
void getDefaultConfigFiles(
)
|
|
Return the default locations of user and system configuration files
getDocs [line 1673]
string getDocs(
string
$key)
|
|
Get the documentation for a config value.
Parameters:
getFTP [line 2108]
PEAR_FTP|false &getFTP(
)
|
|
The ftp server is set in readFTPConfigFile(). It exists only if a remote configuration file has been specified
getGroup [line 1713]
string getGroup(
string
$key)
|
|
Get the parameter group for a config key.
Parameters:
getGroupKeys [line 1754]
array getGroupKeys(
string
$group)
|
|
Get the list of the parameters in a group.
Parameters:
getGroups [line 1732]
Get the list of parameter groups.
getKeys [line 1806]
Get all the current config keys.
getLayers [line 2016]
Returns the layers defined (except the 'default' one)
getPrompt [line 1693]
string getPrompt(
string
$key)
|
|
Get the short documentation for a config value.
Parameters:
getRegistry [line 2034]
getRemote [line 2084]
getREST [line 2093]
PEAR_REST &getREST(
$version, [
$options = array()])
|
|
Parameters:
getSetValues [line 1780]
array getSetValues(
string
$key)
|
|
Get the list of allowed set values for a config value. Returns NULL for config values that are not sets.
Parameters:
getType [line 1652]
string getType(
string
$key)
|
|
Get the type of a config value.
Parameters:
isDefaulted [line 1963]
bool isDefaulted(
string
$key)
|
|
Tells whether a config value has a system-defined value.
Parameters:
isDefined [line 1981]
bool isDefined(
string
$key)
|
|
Tells whether a given key exists as a config value.
Parameters:
isDefinedLayer [line 2003]
bool isDefinedLayer(
string
$layer)
|
|
Tells whether a given config layer exists.
Parameters:
mergeConfigFile [line 890]
bool mergeConfigFile(
string
$file, [bool
$override = true], [string
$layer = 'user'], [string
$strict = true])
|
|
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.
Parameters:
noRegistry [line 2076]
readConfigFile [line 732]
bool readConfigFile(
[string
$file = null], [string
$layer = 'user'], [
$strict = true])
|
|
Reads configuration data from a file. All existing values in the config layer are discarded and replaced with data from the file.
Parameters:
readFTPConfigFile [line 776]
remove [line 1836]
bool remove(
string
$key, [string
$layer = 'user'])
|
|
Remove the a config key from a specific config layer.
Parameters:
removeLayer [line 1866]
bool removeLayer(
string
$layer, string
1)
|
|
Temporarily remove an entire config layer. USE WITH CARE!
Parameters:
set [line 1466]
bool set(
string
$key, string
$value, [string
$layer = 'user'], [string
$channel = false])
|
|
Set a config value in a specific layer (defaults to 'user'). Enforces the types defined in the configuration_info array. An integer config variable will be cast to int, and a set config variable will be validated against its legal values.
Parameters:
setChannels [line 1610]
bool setChannels(
array
$channels, [bool
$merge = false])
|
|
Set the list of channels. This should be set via a call to PEAR_Registry::listChannels()
Parameters:
setInstallRoot [line 2142]
void setInstallRoot(
string|false
$root)
|
|
Parameters:
setRegistry [line 2061]
This is to allow customization like the use of installroot
Parameters:
singleton [line 688]
object an &singleton(
[string
$user_file = ''], [string
$system_file = ''], [
$strict = true])
|
|
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.
Parameters:
store [line 1887]
bool store(
[string
$layer = 'user'], [
$data = null])
|
|
Stores configuration data in a layer.
Parameters:
toDefault [line 1905]
bool toDefault(
string
$key)
|
|
Unset the user-defined value of a config key, reverting the value to the system-defined one.
Parameters:
validConfiguration [line 712]
bool validConfiguration(
)
|
|
Determine whether any configuration files have been detected, and whether a registry object can be retrieved from this configuration.
writeConfigFile [line 970]
bool writeConfigFile(
[string|null
$file = null], [string
$layer = 'user'], [string|null
$data = null])
|
|
Writes data into a config layer from a file.
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:15:51 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|