svn: /phpdoc/ru/trunk/reference/classobj/functions/ get-class-methods.xml
| From: | Shein Alexey | Date: | Mon, 07 Feb 2011 07:17:58 +0000 |
| Subject: | svn: /phpdoc/ru/trunk/reference/classobj/functions/ get-class-methods.xml | ||
| Groups: | php.doc.ru | ||
| Request: | Send a blank email to doc-ru+get-1357@lists.php.net to get a copy of this message | ||
shein Mon, 07 Feb 2011 07:17:58 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308082
Log:
Updated translation.
Changed paths:
U phpdoc/ru/trunk/reference/classobj/functions/get-class-methods.xml
Modified: phpdoc/ru/trunk/reference/classobj/functions/get-class-methods.xml
===================================================================
--- phpdoc/ru/trunk/reference/classobj/functions/get-class-methods.xml 2011-02-07 07:07:00 UTC (rev
308081)
+++ phpdoc/ru/trunk/reference/classobj/functions/get-class-methods.xml 2011-02-07 07:17:58 UTC (rev
308082)
@@ -1,93 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 297028 Maintainer: shein Status: ready -->
+<!-- Reviewed: no -->
<!-- $Revision$ -->
-<!-- EN-Revision: n/a Maintainer: lovchy Status: ready -->
-<!-- splitted from ./en/functions/classobj.xml, last change in rev 1.2 -->
- <refentry xml:id="function.get-class-methods" xmlns="http://docbook.org/ns/docbook">
- <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 role="php">
+<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_methods = get_class_methods($my_class); // ниже приведен полный
пример
-?>
-]]>
- </programlisting>
- </informalexample>
- </para>
- </note>
- <para>
- <example>
- <title>Пример использования
<function>get_class_methods</function></title>
- <programlisting role="php">
-<![CDATA[
-<?php
class myclass {
// конструктор
- function myclass()
+ function myclass()
{
return(true);
}
-
+
// метод 1
- function myfunc1()
+ function myfunc1()
{
return(true);
}
// метод 2
- function myfunc2()
+ function myfunc2()
{
return(true);
}
}
-$my_object = new myclass();
+$class_methods = get_class_methods('myclass');
+// или
+$class_methods = get_class_methods(new myclass());
-$class_methods = get_class_methods(get_class($my_object));
-
foreach ($class_methods as $method_name) {
echo "$method_name\n";
}
-?>
+?>
]]>
- </programlisting>
- <para>
- выведет:
- </para>
- <screen>
+ </programlisting>
+ &example.outputs;
+ <screen>
<![CDATA[
myclass
myfunc1
myfunc2
]]>
- </screen>
- </example>
- </para>
- <simpara>
- См. также <function>get_class_vars</function> и
- <function>get_object_vars</function>.
- </simpara>
- </refsect1>
- </refentry>
+ </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:
@@ -100,7 +145,7 @@
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
-sgml-default-dtd-file:"../~/.phpdoc/manual.ced"
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil