LogModel::instance PHP Method

instance() private static method

Returns the shared instance of this class.
private static instance ( ) : LogModel
return LogModel Returns the instance.
    private static function instance()
    {
        if (!self::$instance) {
            self::$instance = new LogModel();
        }
        return self::$instance;
    }

Usage Example

Beispiel #1
0
 /**
  * Returns the shared instance of this class.
  *
  * @return LogModel Returns the instance.
  */
 private static function instance()
 {
     if (!self::$instance) {
         self::$instance = new LogModel();
     }
     return self::$instance;
 }