making wefra fully customisable by external addons (cont.)
This commit is contained in:
parent
8af6cbec61
commit
502ee062a2
@ -5,7 +5,7 @@ class ClassConfig implements InterfacePostgreSQL, InterfaceConfig {
|
|||||||
public function __construct(){}
|
public function __construct(){}
|
||||||
public function __destruct(){}
|
public function __destruct(){}
|
||||||
|
|
||||||
public function databaseConnect(){
|
public static function databaseConnect(){
|
||||||
try {
|
try {
|
||||||
$oPDOLink = new PDO("pgsql:host=".InterfacePostgreSQL::PG_SERVER.";port=".InterfacePostgreSQL::PG_PORT.";dbname=".InterfacePostgreSQL::PG_DBNAME.";user=".InterfacePostgreSQL::PG_USER.";password=".InterfacePostgreSQL::PG_PASSWORD); //, array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8")
|
$oPDOLink = new PDO("pgsql:host=".InterfacePostgreSQL::PG_SERVER.";port=".InterfacePostgreSQL::PG_PORT.";dbname=".InterfacePostgreSQL::PG_DBNAME.";user=".InterfacePostgreSQL::PG_USER.";password=".InterfacePostgreSQL::PG_PASSWORD); //, array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8")
|
||||||
return $oPDOLink;
|
return $oPDOLink;
|
||||||
@ -38,11 +38,22 @@ class ClassConfig implements InterfacePostgreSQL, InterfaceConfig {
|
|||||||
return ($this->_postURL!='')?InterfaceConfig::URL_ROOT.$this->_postURL:InterfaceConfig::URL_ROOT;
|
return ($this->_postURL!='')?InterfaceConfig::URL_ROOT.$this->_postURL:InterfaceConfig::URL_ROOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPathRoot($post_url=''){
|
||||||
|
$this->_postURL=$post_url;
|
||||||
|
return ($this->_postURL!='')?InterfaceConfig::PATH_ROOT.$this->_postURL:InterfaceConfig::PATH_ROOT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPathCustom($post_url=''){
|
||||||
|
$this->_postURL=$post_url;
|
||||||
|
return ($this->_postURL!='')?InterfaceConfig::PATH_CUSTOM.$this->_postURL:InterfaceConfig::PATH_CUSTOM;
|
||||||
|
}
|
||||||
|
|
||||||
public function getURLScript($post_url=''){
|
public function getURLScript($post_url=''){
|
||||||
$this->_postURL=$post_url;
|
$this->_postURL=$post_url;
|
||||||
return ($this->_postURL!='')?InterfaceConfig::URL_SCRIPT.$this->_postURL:InterfaceConfig::URL_SCRIPT;
|
return ($this->_postURL!='')?InterfaceConfig::URL_SCRIPT.$this->_postURL:InterfaceConfig::URL_SCRIPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getConfig(){
|
public function getConfig(){
|
||||||
$oPDOLink = ClassConfig::databaseConnect();
|
$oPDOLink = ClassConfig::databaseConnect();
|
||||||
$rowsConfig = array();
|
$rowsConfig = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user