public static function getInstance()
 {
     if (null === self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
 public function __construct()
 {
     $this->_config = OsuMirror_Config::getInstance();
     $this->_encryption = OsuMirror_Encryption::getInstance();
     $this->_stats = OsuMirror_Statistics::getInstance();
     $this->view = new OsuMirror_View();
     $this->_init();
 }
 public static function exceptionHandler(Exception $e)
 {
     $stats = OsuMirror_Statistics::getInstance();
     $stats->add('error' . $e->getCode(), 1);
     echo 'ERROR "' . $e->getMessage() . ' [#' . $e->getLine() . '] ' . $e->getFile() . '"';
 }