private function parseUrlAndAppendSchema($url, $flag, $appendScheme = 'http')
    {
        if (!filter_var($url, FILTER_VALIDATE_URL)) {
            $url = $appendScheme . '://' . $url;
        }

        return parse_url($url, $flag);
    }