public static function init()
 {
     if (self::$loader == null) {
         self::$loader = new PagSeguroAutoloader();
     }
     return self::$loader;
 }
 private function __construct()
 {
     self::$path = dirname(__FILE__);
     PagSeguroAutoloader::init();
     self::$resources = PagSeguroResources::init();
     self::$config = PagSeguroConfig::init();
     self::$log = LogPagSeguro::init();
 }
 public static function init()
 {
     if (!function_exists('spl_autoload_register')) {
         throw new Exception("PagSeguroLibrary: Standard PHP Library (SPL) is required.");
     }
     if (self::$loader == null) {
         self::$loader = new PagSeguroAutoloader();
     }
     return self::$loader;
 }
function __autoload($nomeClasse)
{
    $haystack = $nomeClasse;
    $needle = 'PagSeguro';
    $pos = strripos($haystack, $needle);
    if ($pos === false) {
        include PATHCLASSES . $nomeClasse . '.php';
    } else {
        PagSeguroAutoloader::init();
        //include PATHCLASSES.'PagSeguroLibrary/'.$nomeClasse.'.php';
    }
}
 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;
 }