Class: PEAR_Config
Source Location: /PEAR-1.10.12/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
__construct (Constructor) [line 627]
PEAR_Config __construct(
[string
$user_file = ''], [string
$system_file = ''], [bool
$ftp_file = false], [bool
$strict = true])
|
|
Constructor.
Overrides PEAR::__construct() (Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.)
Parameters:
apiVersion [line 2005]
arrayMergeRecursive [line 963]
array arrayMergeRecursive(
array
$arr2, array
$arr1)
|
|
Parameters:
definedBy [line 1937]
string|array definedBy(
string
$key, [boolean
$returnchannel = false])
|
|
Tells what config layer that gets to define a key.
Parameters:
deleteChannel [line 890]
void deleteChannel(
$channel)
|
|
Parameters:
get [line 1340]
mixed get(
string
$key, [
$layer = null], [
$channel = false])
|
|
Returns a configuration value, prioritizing layers as per the layers property.
Parameters:
getConfFile [line 1113]
void getConfFile(
string
$layer)
|
|
Gets the file used for storing the config for a layer
Parameters:
getDefaultChannel [line 1303]
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 693]
void getDefaultConfigFiles(
)
|
|
Return the default locations of user and system configuration files
getDocs [line 1723]
string getDocs(
string
$key)
|
|
Get the documentation for a config value.
Parameters:
getFTP [line 2079]
PEAR_FTP|false &getFTP(
)
|
|
The ftp server is set in readFTPConfigFile(). It exists only if a remote configuration file has been specified
getGroup [line 1759]
string getGroup(
string
$key)
|
|
Get the parameter group for a config key.
Parameters:
getGroupKeys [line 1795]
array getGroupKeys(
string
$group)
|
|
Get the list of the parameters in a group.
Parameters:
getGroups [line 1776]
Get the list of parameter groups.
getKeys [line 1843]
Get all the current config keys.
getLayers [line 1998]
Returns the layers defined (except the 'default' one)
getPrompt [line 1741]
string getPrompt(
string
$key)
|
|
Get the short documentation for a config value.
Parameters:
getRegistry [line 2013]
getREST [line 2063]
PEAR_REST &getREST(
$version, [
$options = array()])
|
|
Parameters:
getSetValues [line 1818]
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 1706]
string getType(
string
$key)
|
|
Get the type of a config value.
Parameters:
isDefined [line 1969]
bool isDefined(
string
$key)
|
|
Tells whether a given key exists as a config value.
Parameters:
isDefinedLayer [line 1988]
bool isDefinedLayer(
string
$layer)
|
|
Tells whether a given config layer exists.
Parameters:
mergeConfigFile [line 914]
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 2055]
readConfigFile [line 761]
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 803]
remove [line 1871]
bool remove(
string
$key, [string
$layer = 'user'], [string
$channel = null])
|
|
Remove the a config key from a specific config layer.
Parameters:
removeLayer [line 1901]
bool removeLayer(
string
$layer, string
1)
|
|
Temporarily remove an entire config layer. USE WITH CARE!
Parameters:
set [line 1500]
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 1663]
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 2110]
void setInstallRoot(
string|false
$root)
|
|
Parameters:
setRegistry [line 2037]
This is to allow customization like the use of installroot
Parameters:
singleton [line 722]
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 1919]
bool store(
[string
$layer = 'user'], [
$data = null])
|
|
Stores configuration data in a layer.
Parameters:
validConfiguration [line 743]
bool validConfiguration(
)
|
|
Determine whether any configuration files have been detected, and whether a registry object can be retrieved from this configuration.
writeConfigFile [line 995]
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 Sun, 19 Apr 2020 14:22:12 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|