mirror of
https://github.com/php/doc-pt_br.git
synced 2026-04-24 16:48:23 +02:00
cf27151e17
* Updates to abandoned/outdated pages in reference/array/functions/ * Updates to outdated/abandoned pages and new translations in reference/classobj/ * Updates to abandoned/outdated pages in reference/ctype/ * Correction to double-byte UTF-8 character which is similar to 'E' * Correction of translation * Updates to abandoned/outdated files and new translations in reference/dir/ * Updates to abandoned/outdated files in reference/mysqli/ * New translation of reference/sockets/functions/socket-atmark.xml * New translation of reference/stream/* * Corrections after QA scripts * Delete reference/stream/versions.xml Arquivo marcado para não tradução. --------- Co-authored-by: LEONARDO LARA RODRIGUES <leonardolara@github.com> Co-authored-by: alfsb <alfsb@users.noreply.github.com>
145 lines
3.3 KiB
XML
145 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 5ea9b57cba0d2005f15922eb259d2a262a845c5f Maintainer: felipe Status: ready --><!-- CREDITS: surfmax,leonardolara -->
|
|
<refentry xml:id="function.get-class-methods" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>get_class_methods</refname>
|
|
<refpurpose>Obtém o nome dos métodos da classe</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>get_class_methods</methodname>
|
|
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>object_or_class</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Obtém o nome dos métodos da classe.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>object_or_class</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
O nome da classe ou a instância do objeto
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retorna um array de nome de métodos definidos para a classe especificada por
|
|
<parameter>object_or_class</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 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>
|
|
O parâmetro <parameter>object_or_class</parameter> agora aceita apenas objetos ou nomes de classe válidos.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemplo de <function>get_class_methods</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
class minhaclasse {
|
|
// construtor
|
|
function __construct()
|
|
{
|
|
return(true);
|
|
}
|
|
|
|
// método 1
|
|
function minhafuncao1()
|
|
{
|
|
return(true);
|
|
}
|
|
|
|
// método 2
|
|
function minhafuncao2()
|
|
{
|
|
return(true);
|
|
}
|
|
}
|
|
|
|
$metodos_da_classe = get_class_methods('minhaclasse');
|
|
// ou
|
|
$metodos_da_classe = get_class_methods(new minhaclasse());
|
|
|
|
foreach ($metodos_da_classe as $nome_do_metodo) {
|
|
echo "$nome_do_metodo\n";
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
__construct
|
|
minhafuncao1
|
|
minhafuncao2
|
|
]]>
|
|
</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
|
|
-->
|