diff --git a/modules/ClassConfig.php b/modules/ClassConfig.php index eac4f1e..7e05656 100644 --- a/modules/ClassConfig.php +++ b/modules/ClassConfig.php @@ -5,7 +5,7 @@ class ClassConfig implements InterfacePostgreSQL, InterfaceConfig { public function __construct(){} public function __destruct(){} - public function databaseConnect(){ + public static function databaseConnect(){ 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") return $oPDOLink; @@ -33,16 +33,27 @@ class ClassConfig implements InterfacePostgreSQL, InterfaceConfig { } } - public function getURLRoot($post_url=''){ - $this->_postURL=$post_url; - return ($this->_postURL!='')?InterfaceConfig::URL_ROOT.$this->_postURL:InterfaceConfig::URL_ROOT; - } + public function getURLRoot($post_url=''){ + $this->_postURL=$post_url; + 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=''){ $this->_postURL=$post_url; return ($this->_postURL!='')?InterfaceConfig::URL_SCRIPT.$this->_postURL:InterfaceConfig::URL_SCRIPT; } + public function getConfig(){ $oPDOLink = ClassConfig::databaseConnect(); $rowsConfig = array();