mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 07:02:09 +01:00
* inclusão dos arquivos originais com revisão atualizada * Tradução em reference/reflection/reflectionclass * ajuste de tradução equivocada * Update construct.xml * Update newinstancewithoutconstructor.xml
88 lines
2.5 KiB
XML
88 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: ec2fe9a592f794978114ef5021db9f1d00c2e05d Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
|
|
<refentry xml:id="reflectionclass.newinstance" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>ReflectionClass::newInstance</refname>
|
|
<refpurpose>Cria uma nova instância de classe a partir de determinados argumentos</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis role="ReflectionClass">
|
|
<modifier>public</modifier> <type>object</type><methodname>ReflectionClass::newInstance</methodname>
|
|
<methodparam rep="repeat"><type>mixed</type><parameter>args</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Cria uma nova instância da classe. Os argumentos fornecidos são passados para o
|
|
construtor de classe.
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>args</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Aceita um número variável de argumentos que são passados para a classe
|
|
construtor, bem como <function>call_user_func</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Uma <classname>ReflectionException</classname> se o construtor da classe não for público.
|
|
</para>
|
|
<para>
|
|
Um <classname>ReflectionException</classname> se a classe não tiver um construtor
|
|
e o parâmetro <parameter>args</parameter> contém um ou mais parâmetros.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>ReflectionClass::newInstanceArgs</methodname></member>
|
|
<member><methodname>ReflectionClass::newInstanceWithoutConstructor</methodname></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
|
|
-->
|