Skip to content

Commit 4a0bf07

Browse files
[PHP 8.4] Document http_(get|clear)_last_response_headers() functions (#204)
* http_get_last_response_headers(), http_get_clear_last_response_headers()の翻訳 * wrapperを翻訳 * インデントとホワイトスペースを原文とあわせる --------- Co-authored-by: 武田 憲太郎 <[email protected]>
1 parent 0e33646 commit 4a0bf07

File tree

3 files changed

+191
-5
lines changed

3 files changed

+191
-5
lines changed

language/predefined/variables/httpresponseheader.xml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: c2cf2290247ae581d10dc4d74d91cc4f97293daa Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: 3f1cd5121f7c9f8347ca69c8f657fdb24c0f9729 Maintainer: takagi Status: ready -->
44

55
<refentry role="variable" xml:id="reserved.variables.httpresponseheader" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
66
<refnamediv>
77
<refname>$http_response_header</refname>
88
<refpurpose>HTTP レスポンスヘッダ</refpurpose>
99
</refnamediv>
10-
10+
1111
<refsect1 role="description">
1212
&reftitle.description;
1313
<para>
@@ -70,9 +70,16 @@ NULL
7070
</example>
7171
</para>
7272
</refsect1>
73-
73+
74+
<refsect1 role="seealso">
75+
&reftitle.seealso;
76+
<simplelist>
77+
<member><function>http_get_last_response_headers</function></member>
78+
<member><function>http_clear_last_response_headers</function></member>
79+
</simplelist>
80+
</refsect1>
81+
7482
</refentry>
75-
7683
<!-- Keep this comment at the end of the file
7784
Local variables:
7885
mode: sgml
@@ -93,4 +100,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
93100
vim: et tw=78 syn=sgml
94101
vi: ts=1 sw=1
95102
-->
96-
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: 3f1cd5121f7c9f8347ca69c8f657fdb24c0f9729 Maintainer: Ippey Status: ready -->
4+
5+
<refentry xml:id="function.http-clear-last-response-headers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
6+
<refnamediv>
7+
<refname>http_clear_last_response_headers</refname>
8+
<refpurpose>保存された HTTP レスポンスヘッダーをクリア</refpurpose>
9+
</refnamediv>
10+
11+
<refsect1 role="description">
12+
&reftitle.description;
13+
<methodsynopsis>
14+
<type>void</type><methodname>http_clear_last_response_headers</methodname>
15+
<void/>
16+
</methodsynopsis>
17+
<simpara>
18+
<link linkend="wrappers.http">HTTP ラッパー</link> を使って受け取った
19+
<acronym>HTTP</acronym> レスポンスをクリアします。
20+
</simpara>
21+
</refsect1>
22+
23+
<refsect1 role="parameters">
24+
&reftitle.parameters;
25+
&no.function.parameters;
26+
</refsect1>
27+
28+
<refsect1 role="returnvalues">
29+
&reftitle.returnvalues;
30+
<simpara>
31+
&return.void;
32+
</simpara>
33+
</refsect1>
34+
35+
<refsect1 role="seealso">
36+
&reftitle.seealso;
37+
<simplelist>
38+
<member><function>http_get_last_response_headers</function></member>
39+
</simplelist>
40+
</refsect1>
41+
42+
</refentry>
43+
<!-- Keep this comment at the end of the file
44+
Local variables:
45+
mode: sgml
46+
sgml-omittag:t
47+
sgml-shorttag:t
48+
sgml-minimize-attributes:nil
49+
sgml-always-quote-attributes:t
50+
sgml-indent-step:1
51+
sgml-indent-data:t
52+
indent-tabs-mode:nil
53+
sgml-parent-document:nil
54+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
55+
sgml-exposed-tags:nil
56+
sgml-local-catalogs:nil
57+
sgml-local-ecat-files:nil
58+
End:
59+
vim600: syn=xml fen fdm=syntax fdl=2 si
60+
vim: et tw=78 syn=sgml
61+
vi: ts=1 sw=1
62+
-->
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: 3f1cd5121f7c9f8347ca69c8f657fdb24c0f9729 Maintainer: Ippey Status: ready -->
4+
5+
<refentry xml:id="function.http-get-last-response-headers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
6+
<refnamediv>
7+
<refname>http_get_last_response_headers</refname>
8+
<refpurpose>最後の HTTP レスポンスヘッダーを取得します</refpurpose>
9+
</refnamediv>
10+
11+
<refsect1 role="description">
12+
&reftitle.description;
13+
<methodsynopsis>
14+
<type class="union"><type>array</type><type>null</type></type><methodname>http_get_last_response_headers</methodname>
15+
<void/>
16+
</methodsynopsis>
17+
<simpara>
18+
<link linkend="wrappers.http">HTTP ラッパー</link> を介して受け取った最後の <acronym>HTTP</acronym> レスポンスヘッダーを含む
19+
<type>配列</type> を返します。
20+
レスポンスヘッダーがない場合は、 &null; を返します。
21+
</simpara>
22+
</refsect1>
23+
24+
<refsect1 role="parameters">
25+
&reftitle.parameters;
26+
&no.function.parameters;
27+
</refsect1>
28+
29+
<refsect1 role="returnvalues">
30+
&reftitle.returnvalues;
31+
<simpara>
32+
<link linkend="wrappers.http">HTTP ラッパー</link> を使って受け取った <acronym>HTTP</acronym> ヘッダーを
33+
インデックス付きの <type>配列</type> で返します。
34+
ヘッダーがない場合は、 &null; を返します。
35+
</simpara>
36+
</refsect1>
37+
38+
<refsect1 role="examples">
39+
&reftitle.examples;
40+
<example xml:id="function.http-get-last-response-headers.example.basic">
41+
<title><function>http_get_last_response_headers</function> example</title>
42+
<simpara>
43+
Description.
44+
</simpara>
45+
<programlisting role="php">
46+
<![CDATA[
47+
<?php
48+
file_get_contents("http://example.com");
49+
var_dump(http_get_last_response_headers());
50+
?>
51+
]]>
52+
</programlisting>
53+
&example.outputs.similar;
54+
<screen>
55+
<![CDATA[
56+
array(14) {
57+
[0]=>
58+
string(15) "HTTP/1.1 200 OK"
59+
[1]=>
60+
string(20) "Accept-Ranges: bytes"
61+
[2]=>
62+
string(11) "Age: 326940"
63+
[3]=>
64+
string(29) "Cache-Control: max-age=604800"
65+
[4]=>
66+
string(38) "Content-Type: text/html; charset=UTF-8"
67+
[5]=>
68+
string(35) "Date: Mon, 11 Nov 2024 13:34:09 GMT"
69+
[6]=>
70+
string(23) "Etag: "3147526947+gzip""
71+
[7]=>
72+
string(38) "Expires: Mon, 18 Nov 2024 13:34:09 GMT"
73+
[8]=>
74+
string(44) "Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT"
75+
[9]=>
76+
string(24) "Server: ECAcc (nyd/D16C)"
77+
[10]=>
78+
string(21) "Vary: Accept-Encoding"
79+
[11]=>
80+
string(12) "X-Cache: HIT"
81+
[12]=>
82+
string(20) "Content-Length: 1256"
83+
[13]=>
84+
string(17) "Connection: close"
85+
}
86+
]]>
87+
</screen>
88+
</example>
89+
</refsect1>
90+
91+
<refsect1 role="seealso">
92+
&reftitle.seealso;
93+
<simplelist>
94+
<member><function>http_clear_last_response_headers</function></member>
95+
</simplelist>
96+
</refsect1>
97+
98+
</refentry>
99+
<!-- Keep this comment at the end of the file
100+
Local variables:
101+
mode: sgml
102+
sgml-omittag:t
103+
sgml-shorttag:t
104+
sgml-minimize-attributes:nil
105+
sgml-always-quote-attributes:t
106+
sgml-indent-step:1
107+
sgml-indent-data:t
108+
indent-tabs-mode:nil
109+
sgml-parent-document:nil
110+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
111+
sgml-exposed-tags:nil
112+
sgml-local-catalogs:nil
113+
sgml-local-ecat-files:nil
114+
End:
115+
vim600: syn=xml fen fdm=syntax fdl=2 si
116+
vim: et tw=78 syn=sgml
117+
vi: ts=1 sw=1
118+
-->

0 commit comments

Comments
 (0)