PHP Class DbPatch_Core_Config

Author: Sandy Pleyte
Author: Martijn De Letter
Show file Open project: dbpatch/dbpatch Class Usage Examples

Protected Properties

Property Type Description
$config null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml

Public Methods

Method Description
__construct ( string $filename = null )
getConfig ( ) : null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml

Protected Methods

Method Description
detectConfigType ( string $filename ) : string Detect config type based on file extension
loadIniConfig ( string $filename, string $section, boolean $allowOverride ) Load a Ini config file
loadPhpConfig ( string $filename, boolean $allowOverride ) Load a PHP config file
loadXmlConfig ( string $filename, string $section, boolean $allowOverride ) Load a XML config file
searchConfigFile ( ) : null | string

Method Details

__construct() public method

public __construct ( string $filename = null )
$filename string optional config file

detectConfigType() protected method

Detect config type based on file extension
protected detectConfigType ( string $filename ) : string
$filename string
return string

getConfig() public method

public getConfig ( ) : null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml
return null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml

loadIniConfig() protected method

Load a Ini config file
protected loadIniConfig ( string $filename, string $section, boolean $allowOverride )
$filename string Path to config file to load
$section string Config section to load from file
$allowOverride boolean

loadPhpConfig() protected method

Load a PHP config file
protected loadPhpConfig ( string $filename, boolean $allowOverride )
$filename string Path to config file to load
$allowOverride boolean

loadXmlConfig() protected method

Load a XML config file
protected loadXmlConfig ( string $filename, string $section, boolean $allowOverride )
$filename string Path to config file to load
$section string Config section to load from file
$allowOverride boolean

searchConfigFile() protected method

protected searchConfigFile ( ) : null | string
return null | string

Property Details

$config protected property

protected null|Zend_Config|Zend_Config_Ini|Zend_Config_Xml $config
return null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml