CategoryModel::instance PHP Method

instance() public static method

The shared instance of this object.
public static instance ( ) : CategoryModel
return CategoryModel Returns the instance.
    public static function instance()
    {
        if (self::$instance === null) {
            self::$instance = new CategoryModel();
        }
        return self::$instance;
    }

Usage Example

Example #1
0
 /**
  * The shared instance of this object.
  *
  * @return CategoryModel Returns the instance.
  */
 public static function instance()
 {
     if (self::$instance === null) {
         self::$instance = new CategoryModel();
     }
     return self::$instance;
 }
All Usage Examples Of CategoryModel::instance