X-Git-Url: http://git.dj3c1t.com/?p=mtweb;a=blobdiff_plain;f=mw%2Fenv%2Fmodules%2Fmw_env_config.php;fp=mw%2Fenv%2Fmodules%2Fmw_env_config.php;h=a9fa106c5a84f35df64cb9c1be31c31f5187b0ec;hp=fcb85f268220d039315bcdae4c6264c13f6b4317;hb=5abc9d5fca28ef86dee6148bb96780d1a7b670f3;hpb=ed558d720ebf6985290c99297f5b1d2c86d1f60a diff --git a/mw/env/modules/mw_env_config.php b/mw/env/modules/mw_env_config.php index fcb85f2..a9fa106 100644 --- a/mw/env/modules/mw_env_config.php +++ b/mw/env/modules/mw_env_config.php @@ -2,15 +2,15 @@ class mw_env_config extends mw_env{ - var $xml_parser; - var $config_file; - var $PATHES; - var $PARAMS; - var $CONFIG; - var $bdd; - var $actions; - - function load_config($bdd, $CONFIG){ + public $xml_parser; + public $config_file; + public $PATHES; + public $PARAMS; + public $CONFIG; + public $bdd; + public $actions; + + public function load_config($bdd, $CONFIG){ if(true){ $this->bdd = $bdd; $this->bdd["table_prefix"] = array(); @@ -35,7 +35,7 @@ else $this->erreur("impossible de trouver le fichier de configuration pour l'installation", true); } - function _load_config($app_config_file, $bdd){ + public function _load_config($app_config_file, $bdd){ $this->xml_parser->parse(file_get_contents($app_config_file)); $app_config = $this->xml_parser->data["config"][0]; if(isset($app_config["subs"]["params"])){ @@ -97,46 +97,46 @@ } } - function get_config_file(){ + public function get_config_file(){ return $this->config_file; } - function set_config_file($config_file){ + public function set_config_file($config_file){ $this->config_file = $config_file; } - function get_PATHES(){ + public function get_PATHES(){ return $this->PATHES; } - function path($name){ + public function path($name){ return isset($this->PATHES[$name]) ? $this->PATHES[$name] : ""; } - function set_PATHES($PATHES){ + public function set_PATHES($PATHES){ foreach($PATHES as $path_name => $path_value){ if($path_value && substr($path_value, -1) != "/") $PATHES[$path_name] .= "/"; } $this->PATHES = $PATHES; } - function get_PARAMS(){ + public function get_PARAMS(){ return $this->PARAMS; } - function param($name){ + public function param($name){ return isset($this->PARAMS[$name]) ? $this->PARAMS[$name] : ""; } - function get_CONFIG(){ + public function get_CONFIG(){ return $this->CONFIG; } - function config($name){ + public function config($name){ return isset($this->CONFIG[$name]) ? $this->CONFIG[$name] : null; } - function set_config($config){ + public function set_config($config){ if(is_array($config)){ foreach($config as $key => $value) $this->CONFIG[$key] = $value; return true; @@ -144,19 +144,19 @@ return false; } - function get_bdd(){ + public function get_bdd(){ return $this->bdd; } - function bdd($name){ + public function bdd($name){ return isset($this->bdd[$name]) ? $this->bdd[$name] : null; } - function set_bdd($key, $value){ + public function set_bdd($key, $value){ $this->bdd[$key] = $value; } - function bdd_ready(){ + public function bdd_ready(){ if(!$this->bdd("sgbd")) return "aucun sgbd defini"; $data = $this->data(); if(!$data) return "objet data non defini"; @@ -169,7 +169,7 @@ return true; } - function add_table_prefix($table_prefix){ + public function add_table_prefix($table_prefix){ if(is_array($table_prefix)){ foreach($table_prefix as $prefix_code => $prefix) $this->bdd["table_prefix"][$prefix_code] = $prefix; return true; @@ -177,10 +177,8 @@ return false; } - function get_actions(){ + public function get_actions(){ return isset($this->actions) ? $this->actions : array(); } } - -?> \ No newline at end of file