Skip to content

PHP 8.4: Add ReflectionConstant stubs を取り込み (#4040) #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion reference/reflection/book.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: fe42297da7bf4910bde3622896b4ecc0f91817ed Maintainer: takagi Status: ready -->
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->

<book xml:id="book.reflection" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -29,6 +29,7 @@
&reference.reflection.reflection;
&reference.reflection.reflectionclass;
&reference.reflection.reflectionclassconstant;
&reference.reflection.reflectionconstant;
&reference.reflection.reflectionenum;
&reference.reflection.reflectionenumunitcase;
&reference.reflection.reflectionenumbackedcase;
Expand Down
94 changes: 94 additions & 0 deletions reference/reflection/reflectionconstant.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
<reference xml:id="class.reflectionconstant" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ReflectionConstant クラス</title>
<titleabbrev>ReflectionConstant</titleabbrev>

<partintro>
<section xml:id="reflectionconstant.intro">
&reftitle.intro;
<simpara>
<classname>ReflectionConstant</classname> クラスは、グローバル定数に関する情報を報告します。
</simpara>
</section>

<section xml:id="reflectionconstant.synopsis">
&reftitle.classsynopsis;

<classsynopsis class="class">
<ooclass>
<modifier>final</modifier>
<classname>ReflectionConstant</classname>
</ooclass>

<oointerface>
<modifier>implements</modifier>
<interfacename>Reflector</interfacename>
</oointerface>

<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<type>string</type>
<varname linkend="reflectionconstant.props.name">name</varname>
</fieldsynopsis>

<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<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'])">
<xi:fallback/>
</xi:include>
<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'])">
<xi:fallback/>
</xi:include>
</classsynopsis>

</section>

<section xml:id="reflectionconstant.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="reflectionconstant.props.name">
<term><varname>name</varname></term>
<listitem>
<simpara>
定数の名前。読み取り専用です。
書き込もうとすると <classname>ReflectionException</classname> がスローされます。
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>

<section role="seealso" xml:id="reflectionconstant.seealso">
&reftitle.seealso;
<simplelist>
<member><classname>ReflectionClassConstant</classname></member>
</simplelist>
</section>

</partintro>

&reference.reflection.entities.reflectionconstant;

</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
69 changes: 69 additions & 0 deletions reference/reflection/reflectionconstant/construct.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
<refentry xml:id="reflectionconstant.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionConstant::__construct</refname>
<refpurpose>ReflectionConstant を構築する</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<constructorsynopsis role="ReflectionConstant">
<modifier>public</modifier> <methodname>ReflectionConstant::__construct</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</constructorsynopsis>
<simpara>
新しい <classname>ReflectionConstant</classname> を構築します。
</simpara>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<simpara>
定数の名前。
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
与えられた定数が存在しない場合は、<classname>ReflectionException</classname> をスローします。
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><link linkend="language.oop5.decon.constructor">Constructors</link></member>
</simplelist>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
84 changes: 84 additions & 0 deletions reference/reflection/reflectionconstant/getextension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
<refentry xml:id="reflectionconstant.getextension" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionConstant::getExtension</refname>
<refpurpose>定数を定義した拡張モジュールの <classname>ReflectionExtension</classname> を取得する</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="ReflectionConstant">
<modifier>public</modifier> <type class="union"><type>ReflectionExtension</type><type>null</type></type><methodname>ReflectionConstant::getExtension</methodname>
<void/>
</methodsynopsis>
<simpara>
この定数を定義した拡張モジュールの <classname>ReflectionExtension</classname> オブジェクトを取得します。
</simpara>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
この定数を定義した拡張モジュールを表す <classname>ReflectionExtension</classname> オブジェクトを返します。
ユーザーが定義した定数の場合は &null; を返します。
</simpara>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title><methodname>ReflectionConstant::getExtension</methodname> の基本的な使い方</title>
<programlisting role="php">
<![CDATA[
<?php
var_dump((new ReflectionConstant('SQLITE3_TEXT'))->getExtension());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
object(ReflectionExtension)#2 (1) {
["name"]=>
string(7) "sqlite3"
}
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>ReflectionConstant::getExtensionName</methodname></member>
</simplelist>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
80 changes: 80 additions & 0 deletions reference/reflection/reflectionconstant/getextensionname.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c477749c82111cbbdd657a0e98eeaeeec0d90c91 Maintainer: nsfisis Status: ready -->
<refentry xml:id="reflectionconstant.getextensionname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionConstant::getExtensionName</refname>
<refpurpose>定数を定義した拡張モジュールの名前を取得する</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="ReflectionConstant">
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>ReflectionConstant::getExtensionName</methodname>
<void/>
</methodsynopsis>
<simpara>
この定数を定義した拡張モジュールの名前を取得します。
</simpara>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
この定数を定義した拡張モジュールの名前を返します。ユーザーが定義した定数の場合は &false; を返します。
</simpara>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title><methodname>ReflectionConstant::getExtensionName</methodname> の基本的な使い方</title>
<programlisting role="php">
<![CDATA[
<?php
var_dump((new ReflectionConstant('SQLITE3_TEXT'))->getExtensionName());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
string(7) "sqlite3"
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>ReflectionConstant::getExtension</methodname></member>
</simplelist>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
Loading