Beispiel #1
0
 private static function lib($repository)
 {
     if (!$repository->start("lib")) {
         return;
     }
     foreach (Lib::classes(true) as $class_path => $class) {
         $i = new InfoClass($class_path, false);
         $base_dir = Lib::path();
         $search_path = File::absolute($base_dir, str_replace(".", "/", $i->package()));
         $target = is_file($search_path . ".php") ? $search_path . ".php" : (is_file($search_path . "/" . basename($search_path) . ".php") ? $search_path : null);
         if ($target !== null) {
             $tgz_filename = $repository->tgz_path($i->package());
             File::tgz($tgz_filename, $target, $base_dir);
             touch($tgz_filename, File::last_update($target));
             $repository->add($i->package(), $i->name(), File::last_update($i->path()), $i->document());
         }
     }
 }