public static function init() { if (self::$resources == null) { self::$resources = new PagSeguroResources(); } return self::$resources; }
private function __construct() { self::$path = dirname(__FILE__); PagSeguroAutoloader::init(); self::$resources = PagSeguroResources::init(); self::$config = PagSeguroConfig::init(); self::$log = LogPagSeguro::init(); }
private function __construct() { self::$path = dirname(__FILE__); if (function_exists('spl_autoload_register')) { require_once "loader" . DIRECTORY_SEPARATOR . "PagSeguroAutoLoader.class.php"; PagSeguroAutoloader::init(); } else { require_once "loader" . DIRECTORY_SEPARATOR . "PagSeguroAutoLoader.php"; } self::$resources = PagSeguroResources::init(); self::$config = PagSeguroConfig::init(); self::$log = LogPagSeguro::init(); }
public function __construct() { if (self::verifyDependencies()) { if (self::$library == null) { self::$path = dirname(__FILE__); PagSeguroAutoloader::init(); self::$resources = PagSeguroResources::init(); self::$config = PagSeguroConfig::init(); self::$log = LogPagSeguro::init(); self::$library = $this; } } return self::$library; }
public function __construct(Credentials $credentials, $serviceName) { $this->credentials = $credentials; $this->serviceName = $serviceName; $this->setEnvironment(PagSeguroConfig::getEnvironment()); $this->setWebserviceUrl(PagSeguroResources::getWebserviceUrl($this->getEnvironment())); $this->setCharset(PagSeguroConfig::getApplicationCharset()); $this->resources = PagSeguroResources::getData($this->serviceName); if (isset($this->resources['servicePath'])) { $this->setServicePath($this->resources['servicePath']); } if (isset($this->resources['serviceTimeout'])) { $this->setServiceTimeout($this->resources['serviceTimeout']); } }
public static function getStaticUrl() { return PagSeguroResources::getStaticUrl(self::$data['environment']); }
public function __construct(PagSeguroCredentials $credentials, $serviceName) { $this->credentials = $credentials; $this->serviceName = $serviceName; try { $this->setEnvironment(PagSeguroConfig::getEnvironment()); $this->setWebserviceUrl(PagSeguroResources::getWebserviceUrl($this->getEnvironment())); $this->setPaymentUrl(PagSeguroResources::getPaymentUrl($this->getEnvironment())); $this->setBaseUrl(PagSeguroResources::getBaseUrl($this->getEnvironment())); $this->setInstallmentUrl(PagSeguroResources::getInstallmentUrl()); $this->setAuthorizationUrl(PagSeguroResources::getAuthorizationUrl()); $this->setSessionUrl(PagSeguroResources::getSessionUrl()); $this->setCharset(PagSeguroConfig::getApplicationCharset()); $this->resources = PagSeguroResources::getData($this->serviceName); if (isset($this->resources['servicePath'])) { $this->setServicePath($this->resources['servicePath']); } if (isset($this->resources['serviceTimeout'])) { $this->setServiceTimeout($this->resources['serviceTimeout']); } } catch (Exception $e) { throw $e; } }