cvs: phpdoc-zh /reference/classobj/functions get-class-methods.xml
| From: | Krazy Nio | Date: | Mon, 31 Mar 2003 14:05:34 +0000 |
| Subject: | cvs: phpdoc-zh /reference/classobj/functions get-class-methods.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-1275@lists.php.net to get a copy of this message | ||
nio Mon Mar 31 09:05:34 2003 EDT
Added files:
/phpdoc-zh/reference/classobj/functions get-class-methods.xml
Log:
Add file
Index: phpdoc-zh/reference/classobj/functions/get-class-methods.xml
+++ phpdoc-zh/reference/classobj/functions/get-class-methods.xml
<?xml version="1.0" encoding="gb2312"?>
<!-- $Revision: 1.1 $ -->
<!-- $Author: nio $ -->
<!-- EN-Revision: 1.3 Maintainer: nio Status: ready -->
<!-- splitted from ./en/functions/classobj.xml, last change in rev 1.2 -->
<refentry id="function.get-class-methods">
<refnamediv>
<refname>get_class_methods</refname>
<refpurpose>·µ»ØÓÉÀàµÄ·½·¨Ãû×é³ÉµÄÊý×é</refpurpose>
</refnamediv>
<refsect1>
<title>ÃèÊö</title>
<methodsynopsis>
<type>array</type><methodname>get_class_methods</methodname>
<methodparam><type>mixed</type><parameter>class_name</parameter></methodparam>
</methodsynopsis>
<para>
·µ»ØÓÉ <parameter>class_name</parameter>
Ö¸¶¨µÄÀàÖж¨ÒåµÄ·½·¨ÃûËù×é³ÉµÄÊý×é¡£
</para>
<note>
<para>
´Ó PHP 4.0.6 ¿ªÊ¼£¬¿ÉÒÔÖ¸¶¨¶ÔÏó±¾ÉíÀ´´úÌæ
<parameter>class_name</parameter>£¬ÀýÈ磺
<informalexample>
<programlisting>
<![CDATA[
$class_methods = get_class_methods($my_class); // see below the full example
]]>
</programlisting>
</informalexample>
</para>
</note>
<para>
<example>
<title><function>get_class_methods</function> ʾÀý</title>
<programlisting role="php">
<![CDATA[
<?php
class myclass {
// constructor
function myclass() {
return(TRUE);
}
// method 1
function myfunc1() {
return(TRUE);
}
// method 2
function myfunc2() {
return(TRUE);
}
}
$my_object = new myclass();
$class_methods = get_class_methods(get_class($my_object));
foreach ($class_methods as $method_name) {
echo "$method_name\n";
}
?>
]]>
</programlisting>
</example>
</para>
<para>
ÔËÐнá¹û£º
<informalexample>
<programlisting>
<![CDATA[
myclass
myfunc1
myfunc2
]]>
</programlisting>
</informalexample>
</para>
<simpara>
²Î¼û <function>get_class_vars</function> ºÍ
<function>get_object_vars</function>¡£
</simpara>
</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:"../../../../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
-->