public static function getInstance($reset = false) { if (!self::$instance) { self::$instance = new self(); $reset = true; } if ($reset) { self::$instance->reset(); } return self::$instance; }