Files
php-doc-ru/reference/classobj/functions/get-class-methods.xml
Andrey Gromov 73d3024fec --
Provided by anonymous 81924 (lex61rus@gmail.com)

git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@343387 c90b9560-bf6c-de11-be94-00142212c4b1
2017-11-10 12:47:31 +00:00

126 lines
2.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 8b5940cadeb4f1c8492f4a7f70743a2be807cf39 Maintainer: shein Status: ready -->
<!-- Reviewed: yes -->
<!-- $Revision$ -->
<refentry xml:id="function.get-class-methods" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>get_class_methods</refname>
<refpurpose>Возвращает массив имен методов класса</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>get_class_methods</methodname>
<methodparam><type>mixed</type><parameter>class_name</parameter></methodparam>
</methodsynopsis>
<para>
Возвращает массив имен методов класса.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>class_name</parameter></term>
<listitem>
<para>
Имя класса или объект
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает массив имен методов, объявленных в классе
<parameter>class_name</parameter>. В случае ошибки будет
возвращен &null;.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>get_class_methods</function></title>
<programlisting role="php">
<![CDATA[
<?php
class myclass {
// конструктор
function myclass()
{
return(true);
}
// метод 1
function myfunc1()
{
return(true);
}
// метод 2
function myfunc2()
{
return(true);
}
}
$class_methods = get_class_methods('myclass');
// или
$class_methods = get_class_methods(new myclass());
foreach ($class_methods as $method_name) {
echo "$method_name\n";
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
myclass
myfunc1
myfunc2
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>get_class</function></member>
<member><function>get_class_vars</function></member>
<member><function>get_object_vars</function></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
-->