private function addClass($class) { foreach (self::$dirs as $key => $dir) { $file = PagSeguroLibrary::getPath() . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $class . '.class.php'; if (file_exists($file) && is_file($file)) { require_once $file; } } }
private function __construct() { define('ALLOW_PAGSEGURO_RESOURCES', true); require_once PagSeguroLibrary::getPath() . DIRECTORY_SEPARATOR . "resources" . DIRECTORY_SEPARATOR . "PagSeguroResources.php"; $varName = self::VAR_NAME; if (isset(${$varName})) { self::$data = ${$varName}; unset(${$varName}); } else { throw new Exception("Resources is undefined."); } }
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."); } }