BanModel::instance PHP Method

instance() public static method

Get the singleton instance of the {@link BanModel} class.
public static instance ( ) : BanModel
return BanModel Returns the singleton instance of this class.
    public static function instance()
    {
        if (!isset(self::$instance)) {
            self::$instance = new BanModel();
        }
        return self::$instance;
    }

Usage Example

Beispiel #1
0
 /**
  * Get the singleton instance of the {@link BanModel} class.
  *
  * @return BanModel Returns the singleton instance of this class.
  */
 public static function instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new BanModel();
     }
     return self::$instance;
 }