Projet

Général

Profil

Paste
Télécharger (431 octets) Statistiques
| Branche: | Révision:

root / class / sites_dir.class.php @ 0f3c4dcc

1
<?php
2
class sites_dir {
3
  private $base_dir;
4

    
5
  public function __construct($dir) {
6
    $this->base_dir = $dir;
7
  }
8
  
9
  public function get_sites() {
10
    $dir_fd = opendir($this->base_dir);
11
    $point_list = array();
12
    while (false !== ($point_dir = readdir($dir_fd))) {
13
      $pt = new site_point($this->base_dir.'/'.$point_dir);
14
      if ($pt->get_prefix() !== false) $point_list[] = $pt;
15
    }
16
    return $point_list;
17
  }
18

    
19
}