/** * Used for singleton pattern * * @return object the instance of the class */ public static function getInstance() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; }