Skip to content

Commit e20825c

Browse files
committed
PHP 8.4: Add ReflectionConstant stubs を取り込み (#4040)
1 parent 5f260d9 commit e20825c

File tree

12 files changed

+847
-1
lines changed

12 files changed

+847
-1
lines changed

reference/reflection/book.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: fe42297da7bf4910bde3622896b4ecc0f91817ed Maintainer: takagi Status: ready -->
2+
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: takagi Status: ready -->
33
<!-- Credits: mumumu -->
44

55
<book xml:id="book.reflection" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -29,6 +29,7 @@
2929
&reference.reflection.reflection;
3030
&reference.reflection.reflectionclass;
3131
&reference.reflection.reflectionclassconstant;
32+
&reference.reflection.reflectionconstant;
3233
&reference.reflection.reflectionenum;
3334
&reference.reflection.reflectionenumunitcase;
3435
&reference.reflection.reflectionenumbackedcase;
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: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
4+
<reference xml:id="class.reflectionconstant" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
5+
<title>ReflectionConstant クラス</title>
6+
<titleabbrev>ReflectionConstant</titleabbrev>
7+
8+
<partintro>
9+
<section xml:id="reflectionconstant.intro">
10+
&reftitle.intro;
11+
<simpara>
12+
<classname>ReflectionConstant</classname> クラスは、グローバル定数に関する情報を報告します。
13+
</simpara>
14+
</section>
15+
16+
<section xml:id="reflectionconstant.synopsis">
17+
&reftitle.classsynopsis;
18+
19+
<classsynopsis class="class">
20+
<ooclass>
21+
<modifier>final</modifier>
22+
<classname>ReflectionConstant</classname>
23+
</ooclass>
24+
25+
<oointerface>
26+
<modifier>implements</modifier>
27+
<interfacename>Reflector</interfacename>
28+
</oointerface>
29+
30+
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
31+
<fieldsynopsis>
32+
<modifier>public</modifier>
33+
<type>string</type>
34+
<varname linkend="reflectionconstant.props.name">name</varname>
35+
</fieldsynopsis>
36+
37+
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
38+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionconstant')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='ReflectionConstant'])">
39+
<xi:fallback/>
40+
</xi:include>
41+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionconstant')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='ReflectionConstant'])">
42+
<xi:fallback/>
43+
</xi:include>
44+
</classsynopsis>
45+
46+
</section>
47+
48+
<section xml:id="reflectionconstant.props">
49+
&reftitle.properties;
50+
<variablelist>
51+
<varlistentry xml:id="reflectionconstant.props.name">
52+
<term><varname>name</varname></term>
53+
<listitem>
54+
<simpara>
55+
定数の名前。読み取り専用です。
56+
書き込もうとすると <classname>ReflectionException</classname> がスローされます。
57+
</simpara>
58+
</listitem>
59+
</varlistentry>
60+
</variablelist>
61+
</section>
62+
63+
<section role="seealso" xml:id="reflectionconstant.seealso">
64+
&reftitle.seealso;
65+
<simplelist>
66+
<member><classname>ReflectionClassConstant</classname></member>
67+
</simplelist>
68+
</section>
69+
70+
</partintro>
71+
72+
&reference.reflection.entities.reflectionconstant;
73+
74+
</reference>
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: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
4+
<refentry xml:id="reflectionconstant.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>ReflectionConstant::__construct</refname>
7+
<refpurpose>ReflectionConstant を構築する</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<constructorsynopsis role="ReflectionConstant">
13+
<modifier>public</modifier> <methodname>ReflectionConstant::__construct</methodname>
14+
<methodparam><type>string</type><parameter>name</parameter></methodparam>
15+
</constructorsynopsis>
16+
<simpara>
17+
新しい <classname>ReflectionConstant</classname> を構築します。
18+
</simpara>
19+
</refsect1>
20+
21+
<refsect1 role="parameters">
22+
&reftitle.parameters;
23+
<variablelist>
24+
<varlistentry>
25+
<term><parameter>name</parameter></term>
26+
<listitem>
27+
<simpara>
28+
定数の名前。
29+
</simpara>
30+
</listitem>
31+
</varlistentry>
32+
</variablelist>
33+
</refsect1>
34+
35+
<refsect1 role="errors">
36+
&reftitle.errors;
37+
<simpara>
38+
与えられた定数が存在しない場合は、<classname>ReflectionException</classname> をスローします。
39+
</simpara>
40+
</refsect1>
41+
42+
<refsect1 role="seealso">
43+
&reftitle.seealso;
44+
<simplelist>
45+
<member><link linkend="language.oop5.decon.constructor">Constructors</link></member>
46+
</simplelist>
47+
</refsect1>
48+
49+
</refentry>
50+
<!-- Keep this comment at the end of the file
51+
Local variables:
52+
mode: sgml
53+
sgml-omittag:t
54+
sgml-shorttag:t
55+
sgml-minimize-attributes:nil
56+
sgml-always-quote-attributes:t
57+
sgml-indent-step:1
58+
sgml-indent-data:t
59+
indent-tabs-mode:nil
60+
sgml-parent-document:nil
61+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
62+
sgml-exposed-tags:nil
63+
sgml-local-catalogs:nil
64+
sgml-local-ecat-files:nil
65+
End:
66+
vim600: syn=xml fen fdm=syntax fdl=2 si
67+
vim: et tw=78 syn=sgml
68+
vi: ts=1 sw=1
69+
-->
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
4+
<refentry xml:id="reflectionconstant.getextension" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>ReflectionConstant::getExtension</refname>
7+
<refpurpose>定数を定義した拡張モジュールの <classname>ReflectionExtension</classname> を取得する</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis role="ReflectionConstant">
13+
<modifier>public</modifier> <type class="union"><type>ReflectionExtension</type><type>null</type></type><methodname>ReflectionConstant::getExtension</methodname>
14+
<void/>
15+
</methodsynopsis>
16+
<simpara>
17+
この定数を定義した拡張モジュールの <classname>ReflectionExtension</classname> オブジェクトを取得します。
18+
</simpara>
19+
</refsect1>
20+
21+
<refsect1 role="parameters">
22+
&reftitle.parameters;
23+
&no.function.parameters;
24+
</refsect1>
25+
26+
<refsect1 role="returnvalues">
27+
&reftitle.returnvalues;
28+
<simpara>
29+
この定数を定義した拡張モジュールを表す <classname>ReflectionExtension</classname> オブジェクトを返します。
30+
ユーザーが定義した定数の場合は &null; を返します。
31+
</simpara>
32+
</refsect1>
33+
34+
<refsect1 role="examples">
35+
&reftitle.examples;
36+
<example>
37+
<title><methodname>ReflectionConstant::getExtension</methodname> の基本的な使い方</title>
38+
<programlisting role="php">
39+
<![CDATA[
40+
<?php
41+
var_dump((new ReflectionConstant('SQLITE3_TEXT'))->getExtension());
42+
?>
43+
]]>
44+
</programlisting>
45+
&example.outputs;
46+
<screen>
47+
<![CDATA[
48+
object(ReflectionExtension)#2 (1) {
49+
["name"]=>
50+
string(7) "sqlite3"
51+
}
52+
]]>
53+
</screen>
54+
</example>
55+
</refsect1>
56+
57+
<refsect1 role="seealso">
58+
&reftitle.seealso;
59+
<simplelist>
60+
<member><methodname>ReflectionConstant::getExtensionName</methodname></member>
61+
</simplelist>
62+
</refsect1>
63+
64+
</refentry>
65+
<!-- Keep this comment at the end of the file
66+
Local variables:
67+
mode: sgml
68+
sgml-omittag:t
69+
sgml-shorttag:t
70+
sgml-minimize-attributes:nil
71+
sgml-always-quote-attributes:t
72+
sgml-indent-step:1
73+
sgml-indent-data:t
74+
indent-tabs-mode:nil
75+
sgml-parent-document:nil
76+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
77+
sgml-exposed-tags:nil
78+
sgml-local-catalogs:nil
79+
sgml-local-ecat-files:nil
80+
End:
81+
vim600: syn=xml fen fdm=syntax fdl=2 si
82+
vim: et tw=78 syn=sgml
83+
vi: ts=1 sw=1
84+
-->
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
4+
<refentry xml:id="reflectionconstant.getextensionname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>ReflectionConstant::getExtensionName</refname>
7+
<refpurpose>定数を定義した拡張モジュールの名前を取得する</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis role="ReflectionConstant">
13+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>ReflectionConstant::getExtensionName</methodname>
14+
<void/>
15+
</methodsynopsis>
16+
<simpara>
17+
この定数を定義した拡張モジュールの名前を取得します。
18+
</simpara>
19+
</refsect1>
20+
21+
<refsect1 role="parameters">
22+
&reftitle.parameters;
23+
&no.function.parameters;
24+
</refsect1>
25+
26+
<refsect1 role="returnvalues">
27+
&reftitle.returnvalues;
28+
<simpara>
29+
この定数を定義した拡張モジュールの名前を返します。ユーザーが定義した定数の場合は &false; を返します。
30+
</simpara>
31+
</refsect1>
32+
33+
<refsect1 role="examples">
34+
&reftitle.examples;
35+
<example>
36+
<title><methodname>ReflectionConstant::getExtensionName</methodname> の基本的な使い方</title>
37+
<programlisting role="php">
38+
<![CDATA[
39+
<?php
40+
var_dump((new ReflectionConstant('SQLITE3_TEXT'))->getExtensionName());
41+
?>
42+
]]>
43+
</programlisting>
44+
&example.outputs;
45+
<screen>
46+
<![CDATA[
47+
string(7) "sqlite3"
48+
]]>
49+
</screen>
50+
</example>
51+
</refsect1>
52+
53+
<refsect1 role="seealso">
54+
&reftitle.seealso;
55+
<simplelist>
56+
<member><methodname>ReflectionConstant::getExtension</methodname></member>
57+
</simplelist>
58+
</refsect1>
59+
60+
</refentry>
61+
<!-- Keep this comment at the end of the file
62+
Local variables:
63+
mode: sgml
64+
sgml-omittag:t
65+
sgml-shorttag:t
66+
sgml-minimize-attributes:nil
67+
sgml-always-quote-attributes:t
68+
sgml-indent-step:1
69+
sgml-indent-data:t
70+
indent-tabs-mode:nil
71+
sgml-parent-document:nil
72+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
73+
sgml-exposed-tags:nil
74+
sgml-local-catalogs:nil
75+
sgml-local-ecat-files:nil
76+
End:
77+
vim600: syn=xml fen fdm=syntax fdl=2 si
78+
vim: et tw=78 syn=sgml
79+
vi: ts=1 sw=1
80+
-->

0 commit comments

Comments
 (0)