1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-24 07:42:10 +01:00

Generate ext/reflection class synopses from stubs - part 3

Closes GH-1138.
This commit is contained in:
Máté Kocsis
2021-12-02 13:07:26 +01:00
committed by GitHub
parent f8718da894
commit 00b3ebfa68
7 changed files with 219 additions and 38 deletions

View File

@@ -20,9 +20,10 @@
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>ReflectionEnum</classname></ooclass>
<ooclass>
<classname>ReflectionEnum</classname>
</ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>ReflectionEnum</classname>
@@ -32,10 +33,6 @@
<modifier>extends</modifier>
<classname>ReflectionClass</classname>
</ooclass>
<oointerface>
<interfacename>Reflector</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&InheritedConstants;</classsynopsisinfo>
@@ -45,15 +42,21 @@
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclass')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Properties;']]))">
<xi:fallback />
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenum')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenum')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenum')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclass')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclass')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
</classsynopsis>
<!-- }}} -->
@@ -73,7 +76,7 @@
&reference.reflection.entities.reflectionenum;
</phpdoc:classref>
<!-- Keep this comment at the end of the file
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="reflectionenum.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionEnum::__construct</refname>
<refpurpose>Instantiates a <classname>ReflectionEnum</classname> object</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<constructorsynopsis>
<modifier>public</modifier> <methodname>ReflectionEnum::__construct</methodname>
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>objectOrClass</parameter></methodparam>
</constructorsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>objectOrClass</parameter></term>
<listitem>
<para>
An enum instance or a name.
</para>
</listitem>
</varlistentry>
</variablelist>
</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
-->

View File

@@ -20,9 +20,10 @@
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>ReflectionEnumBackedCase</classname></ooclass>
<ooclass>
<classname>ReflectionEnumBackedCase</classname>
</ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>ReflectionEnumBackedCase</classname>
@@ -32,10 +33,6 @@
<modifier>extends</modifier>
<classname>ReflectionEnumUnitCase</classname>
</ooclass>
<oointerface>
<interfacename>Reflector</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&InheritedConstants;</classsynopsisinfo>
@@ -45,15 +42,24 @@
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclassconstant')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Properties;']]))">
<xi:fallback />
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumbackedcase')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumbackedcase')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumbackedcase')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumunitcase')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumunitcase')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclassconstant')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
</classsynopsis>
<!-- }}} -->

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="reflectionenumbackedcase.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionEnumBackedCase::__construct</refname>
<refpurpose>Instantiates a <classname>ReflectionEnumBackedCase</classname> object</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<constructorsynopsis>
<modifier>public</modifier> <methodname>ReflectionEnumBackedCase::__construct</methodname>
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>objectOrClass</parameter></methodparam>
<methodparam><type>string</type><parameter>constant</parameter></methodparam>
</constructorsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>objectOrClass</parameter></term>
<listitem>
<para>
An enum instance or a name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>constant</parameter></term>
<listitem>
<para>
An enum constant name.
</para>
</listitem>
</varlistentry>
</variablelist>
</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
-->

View File

@@ -20,40 +20,38 @@
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>ReflectionEnumUnitCase</classname></ooclass>
<ooclass>
<classname>ReflectionEnumUnitCase</classname>
</ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>ReflectionEnumUnitCase</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>ReflectionClassConstant</classname>
</ooclass>
<oointerface>
<interfacename>Reflector</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&InheritedConstants;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclassconstant')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Constants;']]))">
<xi:fallback />
</xi:include>
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclassconstant')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Properties;']]))">
<xi:fallback />
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumunitcase')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"><xi:fallback/></xi:include>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclassconstant')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumunitcase')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionenumunitcase')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionclassconstant')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
</classsynopsis>
<!-- }}} -->

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="reflectionenumunitcase.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionEnumUnitCase::__construct</refname>
<refpurpose>Instantiates a <classname>ReflectionEnumUnitCase</classname> object</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<constructorsynopsis>
<modifier>public</modifier> <methodname>ReflectionEnumUnitCase::__construct</methodname>
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>objectOrClass</parameter></methodparam>
<methodparam><type>string</type><parameter>constant</parameter></methodparam>
</constructorsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>objectOrClass</parameter></term>
<listitem>
<para>
An enum instance or a name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>constant</parameter></term>
<listitem>
<para>
An enum constant name.
</para>
</listitem>
</varlistentry>
</variablelist>
</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
-->

View File

@@ -272,6 +272,7 @@
<function name="reflectionclassconstant::getattributes" from="PHP 8"/>
<function name="reflectionenum" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenum::__construct" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenum::getbackingtype" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenum::getcase" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenum::getcases" from="PHP 8 &gt;= 8.1.0"/>
@@ -279,10 +280,12 @@
<function name="reflectionenum::isbacked" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenumunitcase" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenumunitcase::__construct" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenumunitcase::getenum" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenumunitcase::getvalue" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenumbackedcase" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenumbackedcase::__construct" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionenumbackedcase::getbackingvalue" from="PHP 8 &gt;= 8.1.0"/>
<function name="reflectionproperty" from="PHP 5, PHP 7, PHP 8"/>