コード例 #1
0
ファイル: AutoLoader.php プロジェクト: somov/test_app_itm_ee
 public static function recursive_autoload($file, $path, $flag)
 {
     if (FALSE !== ($handle = opendir($path)) && $flag) {
         while (FAlSE !== ($dir = readdir($handle)) && $flag) {
             if (strpos($dir, '.') === FALSE) {
                 $path2 = $path . '/' . $dir;
                 $filepath = $path2 . '/' . $file . '.php';
                 if (file_exists($filepath)) {
                     $flag = FALSE;
                     require_once $filepath;
                     break;
                 }
                 Autoloader::recursive_autoload($file, $path2, $flag);
             }
         }
         closedir($handle);
     }
 }
コード例 #2
0
ファイル: AutoLoad.php プロジェクト: neruruguay/neru
 public static function recursive_autoload($file, $path)
 {
     if (FALSE !== ($handle = opendir($path))) {
         // search recursively the specified file
         while (FAlSE !== ($dir = readdir($handle))) {
             if (strpos($dir, '.') === FALSE) {
                 $path .= '/' . $dir;
                 $filepath = $path . '/' . $file . '.php';
                 if (file_exists($filepath)) {
                     require_once $filepath;
                     break;
                 }
                 Autoloader::recursive_autoload($file, $path);
             }
         }
         closedir($handle);
     }
 }
コード例 #3
0
ファイル: Autoloader.php プロジェクト: smetagenus/rover-v.0.3
 public static function recursive_autoload($file, $path, $flag)
 {
     if (FALSE !== ($handle = opendir($path)) && $flag) {
         while (FAlSE !== ($dir = readdir($handle)) && $flag) {
             if (strpos($dir, '.') === FALSE) {
                 $path2 = $path . '/' . $dir;
                 $filepath = $path2 . '/' . $file . '.php';
                 if (Autoloader::debug) {
                     Autoloader::StPutFile('ищем файл <b>' . $file . '</b> in ' . $filepath);
                 }
                 if (file_exists($filepath)) {
                     if (Autoloader::debug) {
                         Autoloader::StPutFile('подключили ' . $filepath);
                     }
                     $flag = FALSE;
                     require_once $filepath;
                     break;
                 }
                 Autoloader::recursive_autoload($file, $path2, &$flag);
             }
         }
         closedir($handle);
     }
 }