Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
class Logger {
4
  static $instance = null;
5
 
6
  /* protected */ function __construct() {
7
  }
8
 
9
  /* public */ function log($message) {
10
    error_log($message);
11
  }
12
 
13
  /* static */ function get_instance() {
14
    if (is_null(Logger::$instance)) {
15
      Logger::$instance = new Logger();
16
    };
17
 
18
    return Logger::$instance;
19
  }
20
 
21
  /* static */ function set_instance($instance) {
22
    Logger::$instance = $instance;
23
  }
24
}
25
 
26
?>