mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Reflection::getModifierNames() content
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342104 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
2518dcc566
commit
206ead71b9
1 changed files with 53 additions and 5 deletions
|
@ -16,9 +16,6 @@
|
|||
<para>
|
||||
Gets modifier names.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -29,7 +26,7 @@
|
|||
<term><parameter>modifiers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The modifiers to get, which is from a numeric value.
|
||||
Bitfield of the modifiers to get.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -44,11 +41,62 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>Reflection::getModifierNames</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
class Testing
|
||||
{
|
||||
final public static function foo()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public function bar()
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$foo = new ReflectionMethod('Testing', 'foo');
|
||||
|
||||
echo "Modifiers for method foo():\n";
|
||||
echo $foo->getModifiers() . "\n";
|
||||
echo implode(' ', Reflection::getModifierNames($foo->getModifiers())) . "\n";
|
||||
|
||||
$bar = new ReflectionMethod('Testing', 'bar');
|
||||
|
||||
echo "Modifiers for method bar():\n";
|
||||
echo $bar->getModifiers() . "\n";
|
||||
echo implode(' ', Reflection::getModifierNames($bar->getModifiers()));
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Modifiers for method foo():
|
||||
261
|
||||
final public static
|
||||
Modifiers for method bar():
|
||||
65792
|
||||
public
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>Reflection::export</methodname></member>
|
||||
<member><methodname>ReflectionClass::getModifiers</methodname></member>
|
||||
<member><methodname>ReflectionMethod::getModifiers</methodname></member>
|
||||
<member><methodname>ReflectionProperty::getModifiers</methodname></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
Loading…
Reference in a new issue