Package DE_EPAGES::Database::API::Config
This module contains access function to read Database.d/$Store.conf.
@EXPORT_OK |
Functions
- DatabaseConfig
- DatabaseConfigFileName
- DatabaseConnectionData
- DatabaseRedirect
- StoreConnections
- StoreType
DatabaseConfig
get ini object of the Database.d/$Store.conf
Syntax |
$IniConfig = DatabaseConfig($Store); |
Return |
|
DatabaseConfigFileName
get full file name of the Database.d/$Store.conf
Syntax |
$ConfigFileName= DatabaseConfigFileName($Store); |
Return |
|
DatabaseConnectionData
Gets database info from Database.d/$Store.conf. Throws an error if the section does not exists. Passwords are decrypted transparently.
Syntax |
$hSection = DatabaseConnectionData($Store); |
Example |
$hSection = DatabaseConnectionData('Store'); |
Return |
|
DatabaseRedirect
Get database redirect file from Database.d/$Store.conf, section $Store, key "redirect", except if $RemoteAddr matches the list of exceptions specified by key "AllowFrom". If $FileName is defined, the content of the file "$ENV{'EPAGES_WEBROOT'}/$FileName" shall be returned the client and no database connection shall be opened.
Syntax |
$FileName = DatabaseRedirect($Store); $FileName = DatabaseRedirect($Store, $ConnectionName, $RemoteAddr); |
Input |
|
Return |
|
StoreConnections
get all connections that have config file Database.d/$Store.conf
Syntax |
$aStoreConnections = StoreConnections(); |
Return |
|
StoreType
Returns the store type of a store
Syntax |
$StoreType = StoreType( $Store ); |
Return |
|