Package DE_EPAGES::Database::API::Config
This module contains access function to read Database.d/$Store.conf.
@EXPORT_OK |
Functions
- BUStoreTypes
- BusinessUnits
- DatabaseBackupData
- DatabaseConfig
- DatabaseConfigFileName
- DatabaseConnectionData
- DatabaseRedirect
- GetBusinessUnits
- SetBusinessUnits
- ShopStoreTypes
- StoreConnections
- StoreType
- StoreTypes
- StoreTypesWithCartridge
BUStoreTypes
Returns a list of all store types that have a business unit
Syntax |
$aStoreTypes = BUStoreTypes(); |
Return |
|
BusinessUnits
Gets a hash of store information from Database.d/*.conf for all stores with parameters StoreType, Database, datasource and datasource =~ /mysql/ and Database !~ /mysql/
Syntax |
$StoreConf = BusinessUnits(); |
Return |
|
DatabaseBackupData
Gets database backup info from Database.d/$BackupStore.conf. Passwords are decrypted transparently.
Syntax |
$hSection = DatabaseBackupData($Store, $BackupStore); |
Example |
$hSection = DatabaseBackupData('Store', 'Backup'); |
Input |
|
Return |
|
DatabaseConfig
get ini object of the Database.d/$Store.conf
Syntax |
$IniConfig = DatabaseConfig($Store); |
Input |
|
Return |
|
DatabaseConfigFileName
get full file name of the Database.d/$Store.conf
Syntax |
$ConfigFileName= DatabaseConfigFileName($Store); |
Input |
|
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, $hFlags); |
Example |
$hSection = DatabaseConnectionData('Store'); |
Input |
|
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 |
|
GetBusinessUnits
Returns a list of all stores that are business units.
Syntax |
$aBusinessUnits = GetBusinessUnits($hFlags); $aBusinessUnits = GetBusinessUnits({env => 1, conf => 1}); |
Input |
|
Return |
|
SetBusinessUnits
sets the the environment variable EPAGES_BUSINESS_UNITS to the space join of $aBusinessUnits in: - Linux: /etc/default/epages6 - Windows: registry returns the new value of EPAGES_BUSINESS_UNITS
Syntax |
$Env = SetBusinessUnits($aBusinessUnits); |
Example |
$Env = SetBusinessUnits(GetBusinessUnits({conf => 1})); |
Input |
|
Return |
|
ShopStoreTypes
Returns a list of store types that have cartridge "DE_EPAGES::Shop".
Syntax |
$aStoreTypeList = ShopStoreTypes(); |
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 ); |
Input |
|
Return |
|
StoreTypes
Returns a list of all store types that have at least 1 store
Syntax |
$aStoreTypes = StoreTypes(); |
Return |
|
StoreTypesWithCartridge
Returns a list of store types that have cartridge $CartridgeName and at least 1 store using the store type or config file in StoreTypes.d/.
Syntax |
$aStoreTypeList = StoreTypesWithCartridge($CartridgeName); |
Example |
$aStoreTypeList = StoreTypesWithCartridge('DE_EPAGES::Shop'); |
Input |
|
Return |
|