Exemplo n.º 1
0
 public static function loadGlobal()
 {
     if (!empty(self::$directories)) {
         foreach (self::$directories as $directory) {
             $handle = opendir(APPROOT . DS . $directory . DS);
             while (false !== ($entry = readdir($handle))) {
                 if ($entry != '.' && $entry != '..' && $entry != '.php') {
                     require APPROOT . DS . $directory . DS . $entry;
                 }
             }
         }
     }
     self::$directories = array();
 }
Exemplo n.º 2
0
<?php

require_once 'autoloader_test.php';
spl_autoload_register(array('AutoloaderTest', 'loadtest'));
AutoloaderTest::loadGlobal();