php-doc-en/reference/reflection/reflectionclass/getconstants.xml
Máté Kocsis 98df2cf9a9 Generate reflection methodsynopses based on stubs
We also document the new `$filter` parameter for the `ReflectionClass`
methods `::getConstants()` and `::getReflectionConstants()` and the
respective constants.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-298.
2020-12-31 17:03:54 +01:00

96 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="reflectionclass.getconstants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionClass::getConstants</refname>
<refpurpose>Gets constants</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>ReflectionClass::getConstants</methodname>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>filter</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Gets all defined constants from a class, regardless of their visibility.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>filter</parameter></term>
<listitem>
<para>
The optional filter, for filtering desired constant visibilities. It's configured using
the <link linkend="reflectionclassconstant.constants.modifiers">ReflectionClassConstant constants</link>,
and defaults to all constant visibilities.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
An <type>array</type> of constants, where the keys hold the name
and the values the value of the constants.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>filter</parameter> has been added.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>ReflectionClass::getConstant</methodname></member>
</simplelist>
</para>
</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
-->