php-doc-en/reference/reflection/reflectionclass/getmethod.xml
2018-01-25 15:34:22 +00:00

111 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="reflectionclass.getmethod" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionClass::getMethod</refname>
<refpurpose>Gets a <classname>ReflectionMethod</classname> for a class method</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>ReflectionMethod</type><methodname>ReflectionClass::getMethod</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Gets a <classname>ReflectionMethod</classname> for a class method.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
The method name to reflect.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
A <classname>ReflectionMethod</classname>.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
A <classname>ReflectionException</classname> if the method does not exist.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Basic usage of <methodname>ReflectionClass::getMethod</methodname></title>
<programlisting role="php">
<![CDATA[
<?php
$class = new ReflectionClass('ReflectionClass');
$method = $class->getMethod('getMethod');
var_dump($method);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
object(ReflectionMethod)#2 (2) {
["name"]=>
string(9) "getMethod"
["class"]=>
string(15) "ReflectionClass"
}
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>ReflectionClass::getMethods</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
-->