Property | Type | Description | |
---|---|---|---|
$_app | string | The name of the configured application. | |
$_configBegin | string | The line marking the begin of the generated configuration. | |
$_configEnd | string | The line marking the end of the generated configuration. | |
$_currentConfig | array | The current $conf array of the configured application. | |
$_oldConfig | string | The content of the old configuration file. | |
$_phpConfig | string | The content of the generated configuration file. | |
$_postConfig | string | The manual configuration after the generated configuration. | |
$_preConfig | string | The manual configuration in front of the generated configuration. | |
$_versionTag | string | The version tag of the conf.xml file which will be copied into the conf.php file. | |
$_versionUrl | string | Horde URL to check version information. | |
$_xmlConfigTree | array | The XML tree of the configuration file traversed to an associative array. |
Method | Description | |
---|---|---|
__construct ( string $app = 'horde' ) | Constructor. | |
checkVersions ( ) : array | Contact Horde servers and get version information. | |
configFile ( ) | ||
configNoSQL ( string $ctx, DomNode $node = null, string $switchname = 'driverconfig' ) : array |
Returns the configuration tree for a NoSQL backend configuration to
replace a |
|
configSQL ( string $ctx, DomNode $node = null, string $switchname = 'driverconfig' ) : array |
Returns the configuration tree for an SQL backend configuration to
replace a |
|
generatePHPConfig ( Horde_Variables $formvars, array $custom_conf = null ) : string | Generates the content of the application's configuration file. | |
getPHPConfig ( ) : string | Returns the file content of the current configuration file. | |
getVersion ( string $text ) : string | Get the Horde version string for a config file. | |
readXMLConfig ( array $custom_conf = null ) : array | Reads the application's conf.xml file and builds an associative array from its XML tree. | |
writePHPConfig ( Horde_Variables $formvars, string &$php = null ) : boolean | Generates and writes the content of the application's configuration file. |
Method | Description | |
---|---|---|
__default ( string $ctx, mixed $default ) : array | Returns a certain value from the current configuration array or a default value, if not found, and which of the values have been returned. | |
__defaultRaw ( string $ctx, mixed $default ) : array | Returns a certain value from the current configuration file or a default value, if not found, and which of the values have been returned. | |
_configLDAP ( string $ctx, DomNode $node = null, string $switchname = 'driverconfig' ) : array |
Returns the configuration tree for an LDAP backend configuration to
replace a |
|
_configLDAPUser ( string $ctx, DomNode $node = null ) : array |
Returns the configuration tree for an LDAP configuration to search user
DNs to replace a |
|
_configSQLSplitRead ( string $ctx, DomNode $node, string $phptype ) : array | Returns the configuration items for split-read database setups. | |
_configVFS ( string $ctx, DomNode $node ) : array |
Returns the configuration tree for a VFS backend configuration to
replace a |
|
_default ( string $ctx, mixed $default ) : mixed | Returns a certain value from the current configuration array or a default value, if not found. | |
_defaultRaw ( string $ctx, mixed $default ) : mixed | Returns a certain value from the current configuration file or a default value, if not found. | |
_generatePHPConfig ( array $section, string $prefix, Horde_Variables $formvars ) | Generates the configuration file items for a part of the configuration tree. | |
_getEnumValues ( DomNode $node ) : array |
Returns an associative array containing all possible values of the
specified |
|
_getNodeOnlyText ( DomNode $node ) : string | Returns the content of all text node children of the specified node. | |
_getSwitchValues ( &$node, $curctx ) : array |
Returns a multidimensional associative array representing the specified
|
|
_handleSpecials ( DomNode $node ) : array |
Returns an associative array containing the possible values of a
|
|
_isDefault ( string $ctx, mixed $default ) : boolean | Returns whether a certain value from the current configuration array exists or a default value will be used. | |
_isDefaultRaw ( string $ctx, mixed $default ) : boolean | Returns whether a certain value from the current configuration array exists or a default value will be used. | |
_parseLevel ( &$conf, DOMNodeList $children, string $ctx ) | Parses one level of the configuration XML tree into the associative array containing the traversed configuration tree. | |
_quote ( string $string ) : string | Returns the specified string with escaped single quotes |
public __construct ( string $app = 'horde' ) | ||
$app | string | The name of the application to be configured. |
protected __default ( string $ctx, mixed $default ) : array | ||
$ctx | string | A string representing the key of the configuration array to return. |
$default | mixed | The default value to return if the key wasn't found. |
return | array | First element: either the value of the configuration array's requested key or the default value if the key wasn't found. Second element: whether the returned value was the default value. |
protected __defaultRaw ( string $ctx, mixed $default ) : array | ||
$ctx | string | A string representing the key of the configuration array to return. |
$default | mixed | The default value to return if the key wasn't found. |
return | array | First element: either the value of the configuration array's requested key or the default value if the key wasn't found. Second element: whether the returned value was the default value. |
protected _configLDAP ( string $ctx, DomNode $node = null, string $switchname = 'driverconfig' ) : array | ||
$ctx | string | The context of the |
$node | DomNode | The DomNode representation of the
|
$switchname | string | If $node is not set, the value of the tag's switchname attribute. |
return | array | An associative array with the LDAP configuration tree. |
protected _configLDAPUser ( string $ctx, DomNode $node = null ) : array | ||
$ctx | string | The context of the |
$node | DomNode | The DomNode representation of the
|
return | array | A list of associative arrays with the LDAP configuration tree. |
protected _configVFS ( string $ctx, DomNode $node ) : array | ||
$ctx | string | The context of the |
$node | DomNode | The DomNode representation of the |
return | array | An associative array with the VFS configuration tree. |
protected _default ( string $ctx, mixed $default ) : mixed | ||
$ctx | string | A string representing the key of the configuration array to return. |
$default | mixed | The default value to return if the key wasn't found. |
return | mixed | Either the value of the configuration array's requested key or the default value if the key wasn't found. |
protected _defaultRaw ( string $ctx, mixed $default ) : mixed | ||
$ctx | string | A string representing the key of the configuration array to return. |
$default | mixed | The default value to return if the key wasn't found. |
return | mixed | Either the value of the configuration file's requested key or the default value if the key wasn't found. |
protected _generatePHPConfig ( array $section, string $prefix, Horde_Variables $formvars ) | ||
$section | array | An associative array containing the part of the traversed XML configuration tree that should be processed. |
$prefix | string | A configuration prefix determining the current position inside the configuration file. This prefix will be translated to keys of the $conf array in the generated configuration file. |
$formvars | Horde_Variables | The processed configuration form data. |
protected _getEnumValues ( DomNode $node ) : array | ||
$node | DomNode | The DomNode representation of the |
return | array | An associative array with all possible enum values. |
protected _getNodeOnlyText ( DomNode $node ) : string | ||
$node | DomNode | A DomNode object whose text node children to return. |
return | string | The concatenated values of all text nodes. |
protected _getSwitchValues ( &$node, $curctx ) : array | ||
return | array | An associative array representing the node. |
protected _handleSpecials ( DomNode $node ) : array | ||
$node | DomNode | The DomNode representation of the |
return | array | An associative array with the possible values. |
protected _parseLevel ( &$conf, DOMNodeList $children, string $ctx ) | ||
$children | DOMNodeList | The XML nodes of the level that should be parsed. |
$ctx | string | A string representing the current position (context prefix) inside the configuration XML file. |
public checkVersions ( ) : array | ||
return | array | Keys are app names, values are arrays with two keys: 'version' and 'url'. |
public configNoSQL ( string $ctx, DomNode $node = null, string $switchname = 'driverconfig' ) : array | ||
$ctx | string | The context of the |
$node | DomNode | The DomNode representation of the
|
$switchname | string | If DomNode is not set, the value of the tag's switchname attribute. |
return | array | An associative array with the SQL configuration tree. |
public configSQL ( string $ctx, DomNode $node = null, string $switchname = 'driverconfig' ) : array | ||
$ctx | string | The context of the |
$node | DomNode | The DomNode representation of the |
$switchname | string | If DomNode is not set, the value of the tag's switchname attribute. |
return | array | An associative array with the SQL configuration tree. |
public generatePHPConfig ( Horde_Variables $formvars, array $custom_conf = null ) : string | ||
$formvars | Horde_Variables | The processed configuration form data. |
$custom_conf | array | Any settings that shall be included in the generated configuration. |
return | string | The content of the generated configuration file. |
public getPHPConfig ( ) : string | ||
return | string | The unparsed configuration file content. |
public getVersion ( string $text ) : string | ||
$text | string | The text to parse. |
return | string | The version string or false if not found. |
public readXMLConfig ( array $custom_conf = null ) : array | ||
$custom_conf | array | Any settings that shall be included in the generated configuration. |
return | array | An associative array representing the configuration tree. |
public writePHPConfig ( Horde_Variables $formvars, string &$php = null ) : boolean | ||
$formvars | Horde_Variables | The processed configuration form data. |
$php | string | The content of the generated configuration file. |
return | boolean | True if the configuration file could be written immediately to the file system. |
protected string $_app | ||
return | string |
protected string $_configBegin | ||
return | string |
protected string $_configEnd | ||
return | string |
protected array $_currentConfig | ||
return | array |
protected string $_oldConfig | ||
return | string |
protected string $_phpConfig | ||
return | string |
protected string $_postConfig | ||
return | string |
protected string $_preConfig | ||
return | string |
protected string $_versionTag | ||
return | string |
protected string $_versionUrl | ||
return | string |
protected array $_xmlConfigTree | ||
return | array |