cvs: phpdoc-pt_BR /reference/classobj/functions call-user-method-array.xml call-user-method.xml get-declared-classes.xml

From: Date: Fri, 02 Aug 2002 03:23:21 +0000
Subject: cvs: phpdoc-pt_BR /reference/classobj/functions call-user-method-array.xml call-user-method.xml get-declared-classes.xml
Groups: php.doc.pt-br 
Request: Send a blank email to doc-pt-br+get-70@lists.php.net to get a copy of this message
surfmax Thu Aug 1 23:23:21 2002 EDT Modified files: /phpdoc-pt_BR/reference/classobj/functions call-user-method-array.xml call-user-method.xml get-declared-classes.xml Log: reviewed finding out bugs

Index: phpdoc-pt_BR/reference/classobj/functions/call-user-method-array.xml diff -u phpdoc-pt_BR/reference/classobj/functions/call-user-method-array.xml:1.2 phpdoc-pt_BR/reference/classobj/functions/call-user-method-array.xml:1.3 --- phpdoc-pt_BR/reference/classobj/functions/call-user-method-array.xml:1.2 Wed Jul 31 14:17:20 2002 +++ phpdoc-pt_BR/reference/classobj/functions/call-user-method-array.xml Thu Aug 1 23:23:21 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/classobj.xml, last change in rev 1.36 --> <refentry id="function.call-user-method-array"> <refnamediv> @@ -20,7 +20,7 @@ <para> A fun&ccedil;&atilde;o<function>call_user_method_array</function> est&aacute; em rela&ccedil;&atilde;o ao PHP 4.1.0, use a variante<function>call_user_func_array</function> - com a seguinte sintaxe <literal>array(&amp;$obj, "method_name")</literal>. + com a seguinte sintaxe <literal>array(&$obj, "method_name")</literal>. </para> </warning> <para> Index: phpdoc-pt_BR/reference/classobj/functions/call-user-method.xml diff -u phpdoc-pt_BR/reference/classobj/functions/call-user-method.xml:1.3 phpdoc-pt_BR/reference/classobj/functions/call-user-method.xml:1.4 --- phpdoc-pt_BR/reference/classobj/functions/call-user-method.xml:1.3 Wed Jul 31 14:17:20 2002 +++ phpdoc-pt_BR/reference/classobj/functions/call-user-method.xml Thu Aug 1 23:23:21 2002 @@ -1,91 +1,91 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- splitted from ./en/functions/classobj.xml, last change in rev 1.4 --> - <refentry id="function.call-user-method"> - <refnamediv> - <refname>call_user_method</refname> - <refpurpose> - Chamar um m&eacute;todo de usu&aacute;rio em um objeto espec&iacute;fico [desaprovado] - </refpurpose> - </refnamediv> - <refsect1> - <title>Descri&ccedil;&atilde;o</title> - <methodsynopsis> - <type>mixed</type><methodname>call_user_method</methodname> - <methodparam><type>string</type><parameter>method_name</parameter></methodparam> - <methodparam><type>object</type><parameter>obj</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> - </methodsynopsis> - <warning> - <para> - A fun&ccedil;&atilde;o<function>call_user_method</function> &eacute; desaprovada em rela&ccedil;&atilde;o - ao PHP 4.1.0, use a <function>call_user_func</function> - com a seguinte sintaxe <literal>array(&amp;$obj, "method_name")</literal> . - </para> - </warning> - <para> - Chama o m&eacute;todo referido pelo <parameter>method_name</parameter> do objeto - <parameter>obj</parameter> definido pelo usu&aacute;rio. Um exemplo segue abaixo, - onde n&oacute;s definiremos uma classe, inst&acirc;nciaremos um objeto e usaremos a fun&ccedil;&atilde;o - <function>call_user_method</function> para chamar indiretamente - <varname>print_info</varname> seu m&eacute;todo. - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php -class Country { - var $NAME; - var $TLD; - - function Country($name, $tld) { - $this->NAME = $name; - $this->TLD = $tld; - } - - function print_info($prestr="") { - echo $prestr."Country: ".$this->NAME."\n"; - echo $prestr."Top Level Domain: ".$this->TLD."\n"; - } -} - -$cntry = new Country("Peru","pe"); - -echo "* Calling the object method directly\n"; -$cntry->print_info(); - -echo "\n* Calling the same method indirectly\n"; -call_user_method ("print_info", $cntry, "\t"); -?> -]]> - </programlisting> - </informalexample> - </para> - <simpara> - Veja tamb&eacute;m <function>call_user_func_array</function>, - <function>call_user_func</function>, e - <function>call_user_method_array</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 ---> +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/classobj.xml, last change in rev 1.4 --> + <refentry id="function.call-user-method"> + <refnamediv> + <refname>call_user_method</refname> + <refpurpose> + Chama um m&eacute;todo de usu&aacute;rio num objeto especificado [deprecated] + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>call_user_method</methodname> + <methodparam><type>string</type><parameter>method_name</parameter></methodparam> + <methodparam><type>object</type><parameter>obj</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> + </methodsynopsis> + <warning> + <para> + A fun&ccedil;&atilde;o <function>call_user_method</function> est&aacute; desprezada + no PHP 4.1.0, portanto utilize a variante <function>call_user_func</function> com a sintaxe <literal>array(&amp;$obj, "method_name")</literal>. + </para> + </warning> + <para> + Chama o m&eacute;todo referido por <parameter>method_name</parameter> do + objeto <parameter>obj</parameter> definido pelo usu&aacute;rio. Um exemplo de + seu uso segue abaixo, onde n&oacute; definimos uma classe, inst&acirc;nciamos um + objeto e usamos + <function>call_user_method</function> para chamar indiretamente + <varname>print_info</varname> seu m&eacute;todo. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +class Country { + var $NAME; + var $TLD; + + function Country($name, $tld) { + $this->NAME = $name; + $this->TLD = $tld; + } + + function print_info($prestr="") { + echo $prestr."Country: ".$this->NAME."\n"; + echo $prestr."Top Level Domain: ".$this->TLD."\n"; + } +} + +$cntry = new Country("Peru","pe"); + +echo "* Calling the object method directly\n"; +$cntry->print_info(); + +echo "\n* Calling the same method indirectly\n"; +call_user_method ("print_info", $cntry, "\t"); +?> +]]> + </programlisting> + </informalexample> + </para> + <simpara> + Veja tampb&eacute;m <function>call_user_func_array</function>, + <function>call_user_func</function>, e + <function>call_user_method_array</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 +--> Index: phpdoc-pt_BR/reference/classobj/functions/get-declared-classes.xml diff -u phpdoc-pt_BR/reference/classobj/functions/get-declared-classes.xml:1.3 phpdoc-pt_BR/reference/classobj/functions/get-declared-classes.xml:1.4 --- phpdoc-pt_BR/reference/classobj/functions/get-declared-classes.xml:1.3 Wed Jul 31 14:17:20 2002 +++ phpdoc-pt_BR/reference/classobj/functions/get-declared-classes.xml Thu Aug 1 23:23:21 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/classobj.xml, last change in rev 1.11 --> <refentry id="function.get-declared-classes"> <refnamediv> @@ -30,8 +30,9 @@ Note tamb&eacute;m que, dependendo de quais bibliotecas voc&ecirc; tenha compiladas no PHP, classes adicionais poder&atilde;o estar presente. Isto significa que voc&ecirc; n&atilde;o ser&aacute; capaz de definir suas pr&oacute;prias classes usando estes - nomes. H&aacute; uma lista de classes predefinidas na<link - linkend="reserved.classes">se&ccedil;&atilde;o de Classes Predefinidas do ap&ecirc;ndice. + nomes. H&aacute; uma lista de classes predefinidas em <link + linkend="reserved.classes">Predefined Classes</link> se&ccedil;&atilde;o dos + ap&ecirc;ndices. </para> </note> </refsect1>
« previous php.doc.pt-br (#70) next »