Class: PEAR_Config
Source Location: /PEAR-1.6.2/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 562]
PEAR_Config PEAR_Config(
[string
$user_file = ''], [string
$system_file = ''], [bool
$ftp_file = false], [bool
$strict = true])
|
|
Constructor.
Parameters:
apiVersion [line 1970]
arrayMergeRecursive [line 887]
array arrayMergeRecursive(
array
$arr2, array
$arr1)
|
|
Parameters:
definedBy [line 1872]
string|array definedBy(
string
$key, [boolean
$returnchannel = false])
|
|
Tells what config layer that gets to define a key.
Parameters:
deleteChannel [line 814]
void deleteChannel(
$channel)
|
|
Parameters:
get [line 1260]
mixed get(
string
$key, [
$layer = null], [
$channel = false])
|
|
Returns a configuration value, prioritizing layers as per the layers property.
Parameters:
getConfFile [line 1042]
void getConfFile(
string
$layer)
|
|
Gets the file used for storing the config for a layer
Parameters:
getDefaultChannel [line 1224]
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:
getDocs [line 1618]
string getDocs(
string
$key)
|
|
Get the documentation for a config value.
Parameters:
getFTP [line 2053]
PEAR_FTP|false &getFTP(
)
|
|
The ftp server is set in readFTPConfigFile(). It exists only if a remote configuration file has been specified
getGroup [line 1658]
string getGroup(
string
$key)
|
|
Get the parameter group for a config key.
Parameters:
getGroupKeys [line 1699]
array getGroupKeys(
string
$group)
|
|
Get the list of the parameters in a group.
Parameters:
getGroups [line 1677]
Get the list of parameter groups.
getKeys [line 1751]
Get all the current config keys.
getLayers [line 1961]
Returns the layers defined (except the 'default' one)
getPrompt [line 1638]
string getPrompt(
string
$key)
|
|
Get the short documentation for a config value.
Parameters:
getRegistry [line 1979]
getRemote [line 2029]
getREST [line 2038]
PEAR_REST &getREST(
$version, [
$options = array()])
|
|
Parameters:
getSetValues [line 1725]
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 1597]
string getType(
string
$key)
|
|
Get the type of a config value.
Parameters:
isDefaulted [line 1908]
bool isDefaulted(
string
$key)
|
|
Tells whether a config value has a system-defined value.
Parameters:
isDefined [line 1926]
bool isDefined(
string
$key)
|
|
Tells whether a given key exists as a config value.
Parameters:
isDefinedLayer [line 1948]
bool isDefinedLayer(
string
$layer)
|
|
Tells whether a given config layer exists.
Parameters:
mergeConfigFile [line 841]
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 2021]
readConfigFile [line 683]
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 727]
remove [line 1781]
bool remove(
string
$key, [string
$layer = 'user'])
|
|
Remove the a config key from a specific config layer.
Parameters:
removeLayer [line 1811]
bool removeLayer(
string
$layer, string
1)
|
|
Temporarily remove an entire config layer. USE WITH CARE!
Parameters:
set [line 1411]
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 1555]
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 2087]
void setInstallRoot(
string|false
$root)
|
|
Parameters:
setRegistry [line 2006]
This is to allow customization like the use of installroot
Parameters:
singleton [line 639]
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 1832]
bool store(
[string
$layer = 'user'], [
$data = null])
|
|
Stores configuration data in a layer.
Parameters:
toDefault [line 1850]
bool toDefault(
string
$key)
|
|
Unset the user-defined value of a config key, reverting the value to the system-defined one.
Parameters:
validConfiguration [line 663]
bool validConfiguration(
)
|
|
Determine whether any configuration files have been detected, and whether a registry object can be retrieved from this configuration.
writeConfigFile [line 921]
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:09:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|