diff --git a/payex.php b/payex.php index cf432db..96a7eca 100755 --- a/payex.php +++ b/payex.php @@ -22,6 +22,7 @@ class PayEx static private $config; static private $isConstructed; + static private $configFile = "config.php"; function __construct(){ PayEx::construct(); } @@ -29,7 +30,7 @@ static function construct(){ if(!self::$isConstructed){ self::$config = new stdClass(); - $config = include("config.php"); + $config = include(self::$configFile); foreach($config as $name => $value){ self::setConfig($name, $value); } @@ -37,6 +38,10 @@ static function construct(){ } } + static function setConfigFile($filepath){ + self::$configFile = $filepath; + } + static function setConfig($name, $value){ self::$config->{$name} = $value; }