Files
php-doc-ru/reference/classobj/functions/get-class-methods.xml
Shein Alexey 41359593a2 Updated translation.
git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@308082 c90b9560-bf6c-de11-be94-00142212c4b1
2011-02-07 07:17:58 +00:00

157 lines
3.7 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: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: shein Status: ready -->
<!-- Reviewed: no -->
<!-- $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>
The class name or an object instance
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает массив имен методов, объявленных в классе
<parameter>class_name</parameter>. В случае ошибки будет
возвращен &null;.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.0.0</entry>
<entry>
Начиная с PHP 5, эта функция возвращает имена методов именно так,
как они были объявлены (с учетом регистра). В PHP 4 они
возвращались в нижнем регистре.
</entry>
</row>
<row>
<entry>4.0.6</entry>
<entry>
Добавлена возможность указания самого объекта.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</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
-->