Projet

Général

Profil

Révision 2b7be83a

Ajouté par Jocelyn Delande il y a plus de 10 ans

moved panorama generation to class : PanoramaGenerator

Voir les différences:

class/site_point.class.php
18 18

  
19 19
  public function __construct($dir) {
20 20
    // si $dir n'est pas un répertoire il ne s'agit pas d'un panorama.
21
	  if (!is_dir($dir)) {
22
		  throw new PanoramaFormatException("$dir does not contain a panorama");
23
	  }
21
	  // if (!is_dir($dir)) {
22
	  // 	  throw new PanoramaFormatException("$dir does not contain a panorama");
23
	  // }
24 24
    $this->base_dir = $dir;
25 25
    $this->prefix = basename($dir);
26 26
  }
......
29 29
	  return $this->base_dir.'/'.$this->prefix.'.params';
30 30
  }
31 31

  
32
  public function tiles_path() {
33
	  return $this->base_dir;
34
  }
35

  
36
  public function tiles_prefix() {
37
	  return $this->base_dir.'/'.$this->get_prefix();
38
  }
39

  
32 40
  private function parse_and_cache_params() {
33 41
    if (is_file($this->params_path())) {
34 42
	    $params = parse_ini_file($this->params_path());
......
82 90

  
83 91
  public function get_magnifications() {
84 92
    $dir_fd = opendir($this->base_dir);
93
    $zoom_array = array();
85 94
    while (false !== ($file = readdir($dir_fd))) {                // extraction des paramètres de grossissement par le serveur
86 95
       //echo $file;
87 96
       if (preg_match('/(.*)_([0-9]+)_([0-9]+)_([0-9]+)\.jpg$/', $file, $reg)) {

Formats disponibles : Unified diff