HM\BackUpWordPress\Path::get_instance PHP Method

get_instance() public static method

Returns the *Singleton* instance of this class.
public static get_instance ( ) : Path
return Path The *Singleton* instance.
    public static function get_instance()
    {
        if (!self::$instance instanceof Path) {
            self::$instance = new Path();
        }
        return self::$instance;
    }

Usage Example

 /**
  * Simple class wrapper for Path::get_path()
  *
  * @return string
  */
 private function get_path()
 {
     return Path::get_instance()->get_path();
 }