Esempio n. 1
0
 /**
  * Configure autoloading using Padl.
  *
  * This is designed to play nicely with other autoloaders.
  *
  * @return void
  */
 public static function registerAutoload()
 {
     if (self::$loader == null) {
         self::$loader = new PadlAutoloader();
     }
     return self::$loader;
 }
Esempio n. 2
0
 /**
  * Constructor
  *
  * set private to avoid directly instatiation to implement
  * Singleton Design Pattern
  **/
 private function __construct()
 {
     self::$path = dirname(__FILE__);
     if (function_exists('spl_autoload_register')) {
         require_once "loader" . DIRECTORY_SEPARATOR . "PadlAutoLoader.php";
         PadlAutoloader::registerAutoload();
     } else {
         require_once "loader" . DIRECTORY_SEPARATOR . "PadlAutoLoaderFunction.php";
     }
 }