public static function parseCookieParts(array $cookieParts)
    {
        $cookie = '';
        foreach ($cookieParts as $key => $val) {
            $cookie .= $key.'='.rawurlencode($val).';';
        }
        $cookie = trim($cookie, ';');

        return $cookie;
    }