Example #1
0
 /**
  * Returns and if needed creates a instance
  * Singleton
  *
  * @access public static
  * @return object Instance of the class
  **/
 public static function getInstance()
 {
     if (self::$logWriter == null) {
         throw new Zend_Log_Exception('Incorrect $writer, check settings, type: ' . gettype($writer));
     }
     if (self::$instance == null) {
         self::$instance = new self(self::$logWriter);
     }
     return self::$instance;
 }