private function __construct() { define('ALLOW_PAGSEGURO_CONFIG', true); require_once PagSeguroLibrary::getPath() . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "PagSeguroConfig.php"; $varName = self::VARNAME; if (isset(${$varName})) { self::$data = ${$varName}; unset(${$varName}); } else { throw new Exception("Config is undefined."); } }
private function __construct() { define('ALLOW_PAGSEGURO_CONFIG', true); if (!class_exists('PagSeguroConfigWrapper')) { require_once PagSeguroLibrary::getPath() . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "PagSeguroConfigWrapper.php"; } $wrapper = new PagSeguroConfigWrapper(); if (method_exists($wrapper, 'getConfig')) { self::$data = $wrapper->getConfig(); } else { throw new Exception("Config is undefined."); } }