protected function convertArrayToHeaderString(array $data) {
        $strings = [];
        foreach ($data as $key => $val) {
            if (null === $val) {
                $strings[] = $key;
                continue;
            }
            if (is_bool($val)) {
                $val = !empty($val) ? 1 : 0;
            }
            $strings[] = $key . '=' . $val;
        }
        return implode('; ', $strings);
    }
protected function convertArrayToHeaderString(array $data) {
        $strings = [];
        foreach ($data as $key => $val) {
            if (null === $val) {
                $strings[] = $key;
                continue;
            }
            if (is_bool($val)) {
                $val = !empty($val) ? 1 : 0;
            }
            $strings[] = $key . '=' . $val;
        }
        return implode('; ', $strings);
    }
protected function convertArrayToHeaderString ( array $ data ) { $ strings = [ ] ; foreach ( $ data as $ key => $ val ) { if ( null === $ val ) { $ strings [ ] = $ key ; continue ; } if ( is_bool ( $ val ) ) { $ val = ! empty ( $ val ) ? 1 : 0 ; } $ strings [ ] = $ key . '=' . $ val ; } return implode ( '; ' , $ strings ) ; }
Convert cookie data array to Set-cookie header string
@param array $data
@return string
Convert cookie data array to Set - cookie header string