Projet

Général

Profil

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

root / class / sites_dir.class.php @ 2b7be83a

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

    
12
    $point_list = array();
13
    while (false !== ($point_dir = readdir($dir_fd))) {
14
      $pt = new site_point($this->base_dir.'/'.$point_dir);
15
      if ($pt->get_prefix() !== false) $point_list[] = $pt;
16
    }
17
    return $point_list;
18
  }
19
  
20
  public function get_dir() {
21
    return $this->base_dir;
22
  }
23
}