1
0
mirror of https://github.com/php/doc-zh.git synced 2026-04-30 03:33:11 +02:00
Files
archived-doc-zh/reference/reflection/reflectionmethod.xml
T
魔王卷子 e074ab5ee7 Update reflection 3 (#650)
* Update getclass.xml

* Update isdefaultvalueavailable.xml

* Delete tostring.xml

* Update getname.xml

* Update isbuiltin.xml

* Update construct.xml

* Update export.xml

* Update getclosure.xml

* Update getdeclaringclass.xml

* Update getmodifiers.xml

* Update getprototype.xml

* Update invoke.xml

* Update invokeargs.xml

* Update isabstract.xml

* Update isconstructor.xml

* Update isdestructor.xml

* Update isfinal.xml

* Update isprivate.xml

* Update isprotected.xml

* Update ispublic.xml

* Update isstatic.xml

* Update setaccessible.xml

* Update tostring.xml

* Update reflector.xml

* Update reflectionzendextension.xml

* Update reflectionuniontype.xml

* Update reflectiontype.xml

* Update reflectionreference.xml

* Update reflectionproperty.xml

* Update reflectionparameter.xml

* Update reflectionobject.xml

* Update reflectionnamedtype.xml

* Update reflectionmethod.xml

* Update reflectionfunction.xml

* Update reflectiongenerator.xml

* Update reflectionexception.xml

* Update export.xml
2023-02-16 22:59:01 +08:00

247 lines
7.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 4658c8e6ce1cae4c1bd9c51e93a32809a487217f Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<phpdoc:classref xml:id="class.reflectionmethod" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ReflectionMethod 类</title>
<titleabbrev>ReflectionMethod</titleabbrev>
<partintro>
<!-- {{{ ReflectionMethod intro -->
<section xml:id="reflectionmethod.intro">
&reftitle.intro;
<para>
<classname>ReflectionMethod</classname> 类报告有关方法的信息。
</para>
</section>
<!-- }}} -->
<section xml:id="reflectionmethod.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass>
<classname>ReflectionMethod</classname>
</ooclass>
<classsynopsisinfo>
<ooclass>
<classname>ReflectionMethod</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>ReflectionFunctionAbstract</classname>
</ooclass>
</classsynopsisinfo>
<classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
<type>int</type>
<varname linkend="reflectionmethod.constants.is-static">ReflectionMethod::IS_STATIC</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
<type>int</type>
<varname linkend="reflectionmethod.constants.is-public">ReflectionMethod::IS_PUBLIC</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
<type>int</type>
<varname linkend="reflectionmethod.constants.is-protected">ReflectionMethod::IS_PROTECTED</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
<type>int</type>
<varname linkend="reflectionmethod.constants.is-private">ReflectionMethod::IS_PRIVATE</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
<type>int</type>
<varname linkend="reflectionmethod.constants.is-abstract">ReflectionMethod::IS_ABSTRACT</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
<type>int</type>
<varname linkend="reflectionmethod.constants.is-final">ReflectionMethod::IS_FINAL</varname>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<type>string</type>
<varname linkend="reflectionmethod.props.class">class</varname>
</fieldsynopsis>
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionfunctionabstract')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Properties;']]))">
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionmethod')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='ReflectionMethod'])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionmethod')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='ReflectionMethod'])">
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.reflectionfunctionabstract')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='ReflectionFunctionAbstract'])">
<xi:fallback/>
</xi:include>
</classsynopsis>
<!-- }}} -->
</section>
<!-- {{{ ReflectionMethod properties -->
<section xml:id="reflectionmethod.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="reflectionmethod.props.name">
<term><varname>name</varname></term>
<listitem>
<para>方法名</para>
</listitem>
</varlistentry>
<varlistentry xml:id="reflectionmethod.props.class">
<term><varname>class</varname></term>
<listitem>
<para>类名</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
<!-- {{{ ReflectionMethod constants -->
<section xml:id="reflectionmethod.constants">
&reftitle.constants;
<section xml:id="reflectionmethod.constants.modifiers">
<title>ReflectionMethod 修饰符</title>
<variablelist>
<varlistentry xml:id="reflectionmethod.constants.is-static">
<term><constant>ReflectionMethod::IS_STATIC</constant></term>
<listitem>
<para>
表示该方法是 static。在 PHP 7.4.0 之前,值为 <literal>1</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="reflectionmethod.constants.is-public">
<term><constant>ReflectionMethod::IS_PUBLIC</constant></term>
<listitem>
<para>
表示该方法是 public。在 PHP 7.4.0 之前,值为 <literal>256</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="reflectionmethod.constants.is-protected">
<term><constant>ReflectionMethod::IS_PROTECTED</constant></term>
<listitem>
<para>
表示该方法是 protected。在 PHP 7.4.0 之前,值为 <literal>512</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="reflectionmethod.constants.is-private">
<term><constant>ReflectionMethod::IS_PRIVATE</constant></term>
<listitem>
<para>
表示该方法是 private。在 PHP 7.4.0 之前,值为 <literal>1024</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="reflectionmethod.constants.is-abstract">
<term><constant>ReflectionMethod::IS_ABSTRACT</constant></term>
<listitem>
<para>
表示该方法是 abstract。PHP 7.4.0 之前,值为 <literal>2</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="reflectionmethod.constants.is-final">
<term><constant>ReflectionMethod::IS_FINAL</constant></term>
<listitem>
<para>
表示该方法是 final。PHP 7.4.0 之前,值为 <literal>4</literal>
</para>
</listitem>
</varlistentry>
</variablelist>
<note>
<para>
这些常量的值可能会在不同 PHP 版本间发生更改。建议始终使用常量而不直接依赖值。
</para>
</note>
</section>
</section>
<!-- }}} -->
<section 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>
已移除 <methodname>ReflectionMethod::export</methodname>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</partintro>
&reference.reflection.entities.reflectionmethod;
</phpdoc:classref>
<!-- 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
-->