Skip to content

Commit 794dfa2

Browse files
committed
Add Override Attribute stub
php/doc-en@fe11910
1 parent e86b9da commit 794dfa2

File tree

4 files changed

+146
-2
lines changed

4 files changed

+146
-2
lines changed

language-snippets.ent

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 19e23dc364880a2d85249c9eb3e20c4411e1c30c Maintainer: takagi Status: working -->
3+
<!-- EN-Revision: fe11910e25e7eba44959bd347ba946ffc4d56934 Maintainer: takagi Status: working -->
44
<!-- Credits: hirokawa,haruki,shimooka,mumumu -->
55

66
<!ENTITY installation.enabled.disable 'この拡張モジュールはデフォルトで有効になっています。無効にしたい場合は、次のオプションを指定してコンパイルします。'>
@@ -596,6 +596,10 @@ xmlns="http://docbook.org/ns/docbook"><simpara>この関数は PHP 8.1.0 で
596596

597597
<!ENTITY example.outputs.82.similar '<para xmlns="http://docbook.org/ns/docbook">上の例の PHP 8.2 での出力は、たとえば以下のようになります。:</para>'>
598598

599+
<!ENTITY example.outputs.83 '<para xmlns="http://docbook.org/ns/docbook">上の例の PHP 8.3 での出力は、このようになります。:</para>'>
600+
601+
<!ENTITY example.outputs.83.similar '<para xmlns="http://docbook.org/ns/docbook">上の例の PHP 8.3 での出力は、たとえば以下のようになります。:</para>'>
602+
599603
<!ENTITY example.outputs.32bit '<para xmlns="http://docbook.org/ns/docbook">上の例の 32 ビットマシンでの出力は、このようになります。</para>'>
600604

601605
<!ENTITY example.outputs.64bit '<para xmlns="http://docbook.org/ns/docbook">上の例の 64 ビットマシンでの出力は、このようになります。</para>'>

language/predefined/attributes.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 681fd84dbdef6c0f8fe92848677d95a993b66143 Maintainer: mumumu Status: ready -->
3+
<!-- EN-Revision: fe11910e25e7eba44959bd347ba946ffc4d56934 Maintainer: mumumu Status: ready -->
44
<part xml:id="reserved.attributes" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
55
<title>定義済みのアトリビュート</title>
66

@@ -12,6 +12,7 @@
1212

1313
&language.predefined.attributes.attribute;
1414
&language.predefined.attributes.allowdynamicproperties;
15+
&language.predefined.attributes.override;
1516
&language.predefined.attributes.returntypewillchange;
1617
&language.predefined.attributes.sensitiveparameter;
1718
</part>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: fe11910e25e7eba44959bd347ba946ffc4d56934 Maintainer: mumumu Status: ready -->
4+
<phpdoc:classref xml:id="class.override" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
5+
<title>Override クラス</title>
6+
<titleabbrev>Override</titleabbrev>
7+
8+
<partintro>
9+
10+
<section xml:id="override.intro">
11+
&reftitle.intro;
12+
<para>
13+
</para>
14+
</section>
15+
16+
<section xml:id="override.synopsis">
17+
&reftitle.classsynopsis;
18+
19+
<classsynopsis class="class">
20+
<ooclass>
21+
<modifier>final</modifier>
22+
<classname>Override</classname>
23+
</ooclass>
24+
25+
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
26+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.override')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='Override'])">
27+
<xi:fallback/>
28+
</xi:include>
29+
</classsynopsis>
30+
31+
</section>
32+
33+
<section>
34+
&reftitle.examples;
35+
<example>
36+
<programlisting role="php">
37+
<![CDATA[
38+
<?php
39+
40+
class Base {
41+
protected function foo(): void {}
42+
}
43+
44+
final class Extended extends Base {
45+
#[\Override]
46+
protected function boo(): void {}
47+
}
48+
49+
?>
50+
]]>
51+
</programlisting>
52+
&example.outputs.83.similar;
53+
<screen>
54+
<![CDATA[
55+
Fatal error: Extended::boo() has #[\Override] attribute, but no matching parent method exists
56+
]]>
57+
</screen>
58+
</example>
59+
</section>
60+
61+
<section xml:id="override.seealso">
62+
&reftitle.seealso;
63+
<para>
64+
<simplelist>
65+
<member><link linkend="language.attributes">アトリビュート</link></member>
66+
</simplelist>
67+
</para>
68+
</section>
69+
70+
</partintro>
71+
72+
&language.predefined.attributes.override.construct;
73+
74+
</phpdoc:classref>
75+
<!-- Keep this comment at the end of the file
76+
Local variables:
77+
mode: sgml
78+
sgml-omittag:t
79+
sgml-shorttag:t
80+
sgml-minimize-attributes:nil
81+
sgml-always-quote-attributes:t
82+
sgml-indent-step:1
83+
sgml-indent-data:t
84+
indent-tabs-mode:nil
85+
sgml-parent-document:nil
86+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
87+
sgml-exposed-tags:nil
88+
sgml-local-catalogs:nil
89+
sgml-local-ecat-files:nil
90+
End:
91+
vim600: syn=xml fen fdm=syntax fdl=2 si
92+
vim: et tw=78 syn=sgml
93+
vi: ts=1 sw=1
94+
-->
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: fe11910e25e7eba44959bd347ba946ffc4d56934 Maintainer: mumumu Status: ready -->
4+
<refentry xml:id="override.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>Override::__construct</refname>
7+
<refpurpose>新しいOverrideアトリビュートのインスタンスを作成する</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<constructorsynopsis role="Override">
13+
<modifier>public</modifier> <methodname>Override::__construct</methodname>
14+
<void/>
15+
</constructorsynopsis>
16+
<para>
17+
新しい <classname>Override</classname> のインスタンスを構築します。
18+
</para>
19+
</refsect1>
20+
21+
<refsect1 role="parameters">
22+
&reftitle.parameters;
23+
&no.function.parameters;
24+
</refsect1>
25+
</refentry>
26+
<!-- Keep this comment at the end of the file
27+
Local variables:
28+
mode: sgml
29+
sgml-omittag:t
30+
sgml-shorttag:t
31+
sgml-minimize-attributes:nil
32+
sgml-always-quote-attributes:t
33+
sgml-indent-step:1
34+
sgml-indent-data:t
35+
indent-tabs-mode:nil
36+
sgml-parent-document:nil
37+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
38+
sgml-exposed-tags:nil
39+
sgml-local-catalogs:nil
40+
sgml-local-ecat-files:nil
41+
End:
42+
vim600: syn=xml fen fdm=syntax fdl=2 si
43+
vim: et tw=78 syn=sgml
44+
vi: ts=1 sw=1
45+
-->

0 commit comments

Comments
 (0)