Projet

Général

Profil

Révision afe20e9f

Ajouté par Jocelyn Delande il y a presque 11 ans

Moved error handling and autoloading outside of the utils::init() (__autoload was not working actuallly)

Voir les différences:

class/utils.class.php
1 1
<?php
2 2

  
3
abstract class utils {
4
  static public function init() {
5
    function __autoload($class) {
6
      $class_loc = 'class/'.$class.'.class.php';
7
      if (is_readable($class_loc)) {
8
	require_once($class_loc);
9
      }
10
    }
11

  
12
    function errorToException($code, $msg, $file, $line) {
13
      throw new Exception($msg);
14
    }
15
    set_error_handler('errorToException');
3
function __autoload($class) {
4
  $class_loc = 'class/'.$class.'.class.php';
5
  if (is_readable($class_loc)) {
6
	  require_once($class_loc);
16 7
  }
8
}
17 9

  
10
function errorToException($code, $msg, $file, $line) {
11
  throw new Exception($msg);
12
}
13
set_error_handler('errorToException');
14

  
15

  
16
abstract class utils {
18 17
  static public function list_available_panos($base_dir) {
19 18
	  /** Lists all that can be turned into a panorama
20 19
	   */

Formats disponibles : Unified diff