예제 #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;
 }
예제 #2
0
파일: PadlLibrary.php 프로젝트: vienis/padl
 /**
  * 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";
     }
 }