Skip to content

Commit

Permalink
Document ReflectionConstant::getShortName()
Browse files Browse the repository at this point in the history
  • Loading branch information
iluuu1994 committed Dec 2, 2024
1 parent 775cb67 commit a1a00ed
Showing 1 changed file with 11 additions and 51 deletions.
62 changes: 11 additions & 51 deletions reference/reflection/reflectionconstant/getshortname.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<refentry xml:id="reflectionconstant.getshortname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionConstant::getShortName</refname>
<refpurpose>Description</refpurpose>
<refpurpose>Gets short name</refpurpose>
</refnamediv>

<refsect1 role="description">
Expand All @@ -11,9 +11,8 @@
<modifier>public</modifier> <type>string</type><methodname>ReflectionConstant::getShortName</methodname>
<void/>
</methodsynopsis>
&warn.undocumented.func;
<simpara>
Description.
Gets the short name of the constant, the part without the namespace.
</simpara>
</refsect1>

Expand All @@ -25,77 +24,38 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Description.
The short name of the constant.
</simpara>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
When does this function issue <constant>E_*</constant> level errors,
and/or throw <exceptionname>Exception</exceptionname>s.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.X.0</entry>
<entry>
Description
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example xml:id="reflectionconstant.getshortname.example.basic">
<example>
<title><methodname>ReflectionConstant::getShortName</methodname> example</title>
<simpara>
Description.
</simpara>
<programlisting role="php">
<![CDATA[
<?php
echo "Code example";
namespace Foo;
const BAR = 'bar';
echo (new \ReflectionConstant('Foo\BAR'))->getName();
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Code example
BAR
]]>
</screen>
</example>
</refsect1>

<refsect1 role="notes">
&reftitle.notes;
<note>
<simpara>
Any notes that don't fit anywhere else should go here.
</simpara>
</note>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>ClassName::otherMethodName</methodname></member>
<member><function>some_function</function></member>
<member><methodname>ReflectionConstant::getName</methodname></member>
</simplelist>
</refsect1>

Expand Down

0 comments on commit a1a00ed

Please sign in to comment.