Class Horde_Config
The Horde_Config:: package provides a framework for managing the
configuration of Horde applications, writing conf.php files from
conf.xml source files, generating user interfaces, etc.
Copyright 2002-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public
|
#
__construct( string $app = 'horde' )
Constructor.
Parameters
- $app
- The name of the application to be configured.
|
public
array
|
#
checkVersions( )
Contact Horde servers and get version information.
Contact Horde servers and get version information.
Returns
array Keys are app names, values are arrays with two keys:
'version' and 'url'.
Throws
Horde_Exception
Horde_Http_Client_Exception
|
public
|
|
public
array
|
#
readXMLConfig( array $custom_conf = null )
Reads the application's conf.xml file and builds an associative array
from its XML tree.
Reads the application's conf.xml file and builds an associative array
from its XML tree.
Parameters
- $custom_conf
- <p>Any settings that shall be included in the
generated configuration.</p>
Returns
array An associative array representing the configuration
tree.
|
public
string
|
#
getVersion( string $text )
Get the Horde version string for a config file.
Get the Horde version string for a config file.
Parameters
Returns
string The version string or false if not found.
|
public
string
|
#
getPHPConfig( )
Returns the file content of the current configuration file.
Returns the file content of the current configuration file.
Returns
string The unparsed configuration file content.
|
public
boolean
|
#
writePHPConfig( Horde_Variables $formvars, string & $php = null )
Generates and writes the content of the application's configuration
file.
Generates and writes the content of the application's configuration
file.
Parameters
- $formvars
- <p>The processed configuration form
data.</p>
- $php
- <p>The content of the generated
configuration file.</p>
Returns
boolean True if the configuration file could be written
immediately to the file system.
Since
Horde_Core 1.1.0
|
public
string
|
#
generatePHPConfig( Horde_Variables $formvars, array $custom_conf = null )
Generates the content of the application's configuration file.
Generates the content of the application's configuration file.
Parameters
- $formvars
- <p>The processed configuration form
data.</p>
- $custom_conf
- <p>Any settings that shall be included
in the generated configuration.</p>
Returns
string The content of the generated configuration file.
|
public
array
|
#
configSQL( string $ctx, DomNode $node = null, string $switchname = 'driverconfig' )
Returns the configuration tree for an SQL backend configuration to
replace a tag.
Subnodes will be parsed and added to both the Horde defaults and the
Custom configuration parts.
Returns the configuration tree for an SQL backend configuration to
replace a tag.
Subnodes will be parsed and added to both the Horde defaults and the
Custom configuration parts.
Parameters
- $ctx
- The context of the <configsql> tag.
- $node
- <p>The DomNode representation of the <configsql>
tag.</p>
- $switchname
- <p>If DomNode is not set, the value of the
tag's switchname attribute.</p>
Returns
array An associative array with the SQL configuration tree.
|