Esempio n. 1
0
function lmb_glob($path)
{
    if (lmb_is_path_absolute($path)) {
        return glob($path);
    }
    $result = array();
    foreach (lmb_get_include_path_items() as $dir) {
        if ($res = glob("{$dir}/{$path}")) {
            foreach ($res as $item) {
                $result[] = $item;
            }
        }
    }
    return $result;
}
 static function getClassPath($refl)
 {
     $path = $refl->getFileName();
     //if include path is a part of the class path remove it
     //since it makes serializable stuff more tolerant to changes in filesystem
     foreach (lmb_get_include_path_items() as $inc_path) {
         if (!$inc_path) {
             continue;
         }
         $inc_path = rtrim($inc_path, '/\\');
         if (strpos($path, $inc_path) === 0) {
             return substr($path, strlen($inc_path) + 1);
         }
     }
     return $path;
 }