Tradução da API Reflection
| From: | Felipe Barth | Date: | Sat, 15 Jun 2013 01:10:30 +0000 |
| Subject: | Tradução da API Reflection | ||
| Groups: | php.doc.pt-br | ||
| Request: | Send a blank email to doc-pt-br+get-4188@lists.php.net to get a copy of this message | ||
Boa noite!
Estou iniciando a tradução da API Reflection, favor revisar os docs que já
estão prontos.
Peço a gentileza que caso haja algo incorreto nas traduções, me avise para
que não ocorra novamente.
Muito obrigado.
Index: pt_BR/reference/reflection/reflectionfunction.xml
--- pt_BR/reference/reflection/reflectionfunction.xml
+++ pt_BR/reference/reflection/reflectionfunction.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 321891 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<phpdoc:classref xml:id="class.reflectionfunction" xmlns:phpdoc="
http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="
http://www.w3.org/2001/XInclude">
+
+ <title>Classe ReflectionFunction</title>
+ <titleabbrev>ReflectionFunction</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ ReflectionFunction intro -->
+ <section xml:id="reflectionfunction.intro">
+ &reftitle.intro;
+ <para>
+ A classe <classname>ReflectionFunction</classname> reporta
+ informações sobre uma função.
+ </para>
+ </section>
+<!-- }}} -->
+
+ <section xml:id="reflectionfunction.synopsis">
+ &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+ <classsynopsis>
+ <ooclass><classname>ReflectionFunction</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+ <classsynopsisinfo>
+ <ooclass>
+ <classname>ReflectionFunction</classname>
+ </ooclass>
+
+ <ooclass>
+ <modifier>extends</modifier>
+ <classname>ReflectionFunctionAbstract</classname>
+ </ooclass>
+
+ <oointerface>
+ <interfacename>Reflector</interfacename>
+ </oointerface>
+ </classsynopsisinfo>
+<!-- }}} -->
+ <classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="reflectionfunction.constants.is-deprecated">ReflectionFunction::IS_DEPRECATED</varname>
+ <initializer>262144</initializer>
+ </fieldsynopsis>
+
+ <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
+ <fieldsynopsis>
+ <modifier>public</modifier>
+ <varname linkend="reflectionfunction.props.name">name</varname>
+ </fieldsynopsis>
+
+
+ <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.reflectionfunction')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+
+ <classsynopsisinfo
role="comment">&InheritedMethods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.reflectionfunctionabstract')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+
+ </classsynopsis>
+<!-- }}} -->
+
+ </section>
+
+
+<!-- {{{ ReflectionFunction properties -->
+ <section xml:id="reflectionfunction.props">
+ &reftitle.properties;
+ <variablelist>
+ <varlistentry xml:id="reflectionfunction.props.name">
+ <term><varname>name</varname></term>
+ <listitem>
+ <para>
+ Nome da função. Apenas leitura, gera
+ <classname>ReflectionException</classname> na tentativa de escrita.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+<!-- }}} -->
+
+
+<!-- {{{ ReflectionFunction constants -->
+ <section xml:id="reflectionfunction.constants">
+ &reftitle.constants;
+ <section xml:id="reflectionfunction.constants.modifiers">
+ <title>Modificadores ReflectionFunction</title>
+ <variablelist>
+
+ <varlistentry xml:id="reflectionfunction.constants.is-deprecated">
+ <term><constant>ReflectionFunction::IS_DEPRECATED</constant></term>
+ <listitem>
+ <para>
+ Indica uma função depreciada.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </section>
+ </section>
+<!-- }}} -->
+
+
+ </partintro>
+
+ &reference.reflection.entities.reflectionfunction;
+
+</phpdoc:classref>
+
+<!-- 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
+-->
Index: pt_BR/reference/reflection/reflectionextension.xml
--- pt_BR/reference/reflection/reflectionextension.xml
+++ pt_BR/reference/reflection/reflectionextension.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 299908 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<phpdoc:classref xml:id="class.reflectionextension" xmlns:phpdoc="
http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="
http://www.w3.org/2001/XInclude">
+
+ <title>Classe ReflectionExtension</title>
+ <titleabbrev>ReflectionExtension</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ ReflectionExtension intro -->
+ <section xml:id="reflectionextension.intro">
+ &reftitle.intro;
+ <para>
+ A classe <classname>ReflectionExtension</classname> reporta
+ informações sobre uma extensão.
+ </para>
+ </section>
+<!-- }}} -->
+
+ <section xml:id="reflectionextension.synopsis">
+ &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+ <classsynopsis>
+ <ooclass><classname>ReflectionExtension</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+ <classsynopsisinfo>
+ <ooclass>
+ <classname>ReflectionExtension</classname>
+ </ooclass>
+
+ <oointerface>
+ <interfacename>Reflector</interfacename>
+ </oointerface>
+ </classsynopsisinfo>
+<!-- }}} -->
+ <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
+ <fieldsynopsis>
+ <modifier>public</modifier>
+ <varname linkend="reflectionextension.props.name">name</varname>
+ </fieldsynopsis>
+
+
+ <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.reflectionextension')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+ </classsynopsis>
+<!-- }}} -->
+
+ </section>
+
+
+<!-- {{{ ReflectionExtension properties -->
+ <section xml:id="reflectionextension.props">
+ &reftitle.properties;
+ <variablelist>
+ <varlistentry xml:id="reflectionextension.props.name">
+ <term><varname>name</varname></term>
+ <listitem>
+ <para>
+ Nome da extensão, mesmo que chamar o método
+ <methodname>ReflectionExtension::getName</methodname>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+<!-- }}} -->
+
+
+ </partintro>
+
+ &reference.reflection.entities.reflectionextension;
+
+</phpdoc:classref>
+
+<!-- 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
+-->
Index: pt_BR/reference/reflection/reflectionexception.xml
--- pt_BR/reference/reflection/reflectionexception.xml
+++ pt_BR/reference/reflection/reflectionexception.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 321905 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<phpdoc:classref xml:id="class.reflectionexception" xmlns:phpdoc="
http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="
http://www.w3.org/2001/XInclude">
+
+ <title>Classe ReflectionException</title>
+ <titleabbrev>ReflectionException</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ ReflectionException intro -->
+ <section xml:id="reflectionexception.intro">
+ &reftitle.intro;
+ <para>
+ Classe ReflectionException.
+ </para>
+ </section>
+<!-- }}} -->
+
+ <section xml:id="reflectionexception.synopsis">
+ &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+ <classsynopsis>
+ <ooclass><classname>ReflectionException</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+ <classsynopsisinfo>
+ <ooclass>
+ <classname>ReflectionException</classname>
+ </ooclass>
+
+ <ooclass>
+ <modifier>extends</modifier>
+ <classname>Exception</classname>
+ </ooclass>
+ </classsynopsisinfo>
+<!-- }}} -->
+ <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('exception.synopsis')/db:classsynopsis/db:fieldsynopsis)" />
+
+ <classsynopsisinfo
role="comment">&InheritedMethods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+
+ </classsynopsis>
+<!-- }}} -->
+
+ </section>
+
+
+ </partintro>
+
+</phpdoc:classref>
+
+<!-- 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
+-->
Index: pt_BR/reference/reflection/book.xml
--- pt_BR/reference/reflection/book.xml
+++ pt_BR/reference/reflection/book.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 330340 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<book xml:id="book.reflection" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <?phpdoc extension-membership="core" ?>
+ <title>Reflexão</title>
+ <titleabbrev>Reflexão</titleabbrev>
+
+ <preface xml:id="intro.reflection">
+ &reftitle.intro;
+ <para>
+ PHP 5 vem com uma completa API de reflexão que acrescenta a capacidade
de realizar
+ <literal>engenharia reversa</literal> em classes, interfaces, funções,
+ métodos e extensões. Além disso, a API de reflexão oferece maneiras de
+ recuperar comentários de documentação para as funções, classes e
métodos.
+ </para>
+ <para>
+ Por favor note que algumas partes da <acronym>API</acronym>
+ está faltando o código necessário para executar a extensão de reflexão.
+ Por exemplo, uma classe PHP interna pode estar faltando dados de
reflexão para as
+ propriedades. Estes são poucos casos que são considerados bugs, no
entando eles devem
+ ser descobertos e corrigidos.
+ </para>
+ </preface>
+
+ &reference.reflection.setup;
+ &reference.reflection.constants;
+ &reference.reflection.examples;
+ &reference.reflection.extending;
+ &reference.reflection.reflection;
+ &reference.reflection.reflectionclass;
+ &reference.reflection.reflectionzendextension;
+ &reference.reflection.reflectionextension;
+ &reference.reflection.reflectionfunction;
+ &reference.reflection.reflectionfunctionabstract;
+ &reference.reflection.reflectionmethod;
+ &reference.reflection.reflectionobject;
+ &reference.reflection.reflectionparameter;
+ &reference.reflection.reflectionproperty;
+ &reference.reflection.reflector;
+ &reference.reflection.reflectionexception;
+
+</book>
+
+<!-- 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
+-->
+
Index: pt_BR/reference/reflection/configure.xml
--- pt_BR/reference/reflection/configure.xml
+++ pt_BR/reference/reflection/configure.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 290998 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<section xml:id="reflection.installation" xmlns="
http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ &reftitle.install;
+
+ <para>
+ A extensão reflexão é ativada por padrão, a partir do PHP 5.
+ </para>
+
+</section>
+
+
+<!-- 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
+-->
Index: pt_BR/reference/reflection/constants.xml
--- pt_BR/reference/reflection/constants.xml
+++ pt_BR/reference/reflection/constants.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 290998 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<appendix xml:id="reflection.constants" xmlns="
http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ &reftitle.constants;
+ <para>
+ Cada classe descreve suas próprias constantes.
+ </para>
+</appendix>
+
+<!-- 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
+-->
+
Index: pt_BR/reference/reflection/examples.xml
--- pt_BR/reference/reflection/examples.xml
+++ pt_BR/reference/reflection/examples.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 290998 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<chapter xml:id="reflection.examples" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ &reftitle.examples;
+ <para>
+ Existem muitos exemplos dentro da documentação Reflexão, tipicamente
+ dentro da documentação do __construct de cada classe.
+ </para>
+ <example>
+ <title>Exemplo de Reflexão no shell (terminal)</title>
+ <programlisting role="shell">
+<![CDATA[
+$ php --rf strlen
+$ php --rc finfo
+$ php --re json
+$ php --ri dom
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Function [ <internal:Core> function strlen ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $str ]
+ }
+}
+
+Class [ <internal:fileinfo> class finfo ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [4] {
+ Method [ <internal:fileinfo, ctor> public method finfo ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <optional> $options ]
+ Parameter #1 [ <optional> $arg ]
+ }
+ }
+
+ Method [ <internal:fileinfo> public method set_flags ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $options ]
+ }
+ }
+
+ Method [ <internal:fileinfo> public method file ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> $filename ]
+ Parameter #1 [ <optional> $options ]
+ Parameter #2 [ <optional> $context ]
+ }
+ }
+
+ Method [ <internal:fileinfo> public method buffer ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> $string ]
+ Parameter #1 [ <optional> $options ]
+ Parameter #2 [ <optional> $context ]
+ }
+ }
+ }
+}
+
+Extension [ <persistent> extension #23 json version 1.2.1 ] {
+
+ - Constants [10] {
+ Constant [ integer JSON_HEX_TAG ] { 1 }
+ Constant [ integer JSON_HEX_AMP ] { 2 }
+ Constant [ integer JSON_HEX_APOS ] { 4 }
+ Constant [ integer JSON_HEX_QUOT ] { 8 }
+ Constant [ integer JSON_FORCE_OBJECT ] { 16 }
+ Constant [ integer JSON_ERROR_NONE ] { 0 }
+ Constant [ integer JSON_ERROR_DEPTH ] { 1 }
+ Constant [ integer JSON_ERROR_STATE_MISMATCH ] { 2 }
+ Constant [ integer JSON_ERROR_CTRL_CHAR ] { 3 }
+ Constant [ integer JSON_ERROR_SYNTAX ] { 4 }
+ }
+
+ - Functions {
+ Function [ <internal:json> function json_encode ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> $value ]
+ Parameter #1 [ <optional> $options ]
+ }
+ }
+ Function [ <internal:json> function json_decode ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> $json ]
+ Parameter #1 [ <optional> $assoc ]
+ Parameter #2 [ <optional> $depth ]
+ }
+ }
+ Function [ <internal:json> function json_last_error ] {
+
+ - Parameters [0] {
+ }
+ }
+ }
+}
+
+dom
+
+DOM/XML => enabled
+DOM/XML API Version => 20031129
+libxml Version => 2.7.3
+HTML Support => enabled
+XPath Support => enabled
+XPointer Support => enabled
+Schema Support => enabled
+RelaxNG Support => enabled
+]]>
+ </screen>
+ </example>
+</chapter>
+
+<!-- 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
+-->
+
Index: pt_BR/reference/reflection/extending.xml
--- pt_BR/reference/reflection/extending.xml
+++ pt_BR/reference/reflection/extending.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 313913 Maintainer: Felipe Barth Status: wip -->
+<!-- Reviewed: no -->
+
+<chapter xml:id="reflection.extending" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title>Extendendo</title>
+ <para>
+ Caso queira criar versões especializdas das
+ classes nativas(digamos, para criar HTML colorido
+ quando sendo exportado, tendo variáveis membros de
+ fácil acesso ao invés de métodos ou tendo métodos utilitários),
+ você pode extendê-las.
+ </para>
+ <example>
+ <title>Extendendo classe nativas</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+/**
+ * Minha Classe Reflection_Method
+ */
+class My_Reflection_Method extends ReflectionMethod
+{
+ public $visibility = array();
+
+ public function __construct($o, $m)
+ {
+ parent::__construct($o, $m);
+ $this->visibility =
Reflection::getModifierNames($this->getModifiers());
+ }
+}
+
+/**
+ * Demonstração classe #1
+ *
+ */
+class T {
+ protected function x() {}
+}
+
+/**
+ * Demonstração classe #2
+ *
+ */
+class U extends T {
+ function x() {}
+}
+
+// Imprimir as informações
+var_dump(new My_Reflection_Method('U', 'x'));
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+object(My_Reflection_Method)#1 (3) {
+ ["visibility"]=>
+ array(1) {
+ [0]=>
+ string(6) "public"
+ }
+ ["name"]=>
+ string(1) "x"
+ ["class"]=>
+ string(1) "U"
+}
+]]>
+ </screen>
+ </example>
+ <caution>
+ <para>
+ Se construtor for sobrescrito, lembre-se de chamar
+ o contrutor pai antes de qualquer código que você adicionar.
+ Se isto não for feito irá resultar no seguinte erro:
+ <literal>Fatal error: Internal error: Failed to retrieve the reflection
object</literal>
+ </para>
+ </caution>
+</chapter>
+
+<!-- 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
+-->
+
Index: pt_BR/reference/reflection/reflection.xml
--- pt_BR/reference/reflection/reflection.xml
+++ pt_BR/reference/reflection/reflection.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 292734 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<phpdoc:classref xml:id="class.reflection" xmlns:phpdoc="
http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="
http://www.w3.org/2001/XInclude">
+
+ <title>Classe Reflection</title>
+ <titleabbrev>Reflection</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ Reflection intro -->
+ <section xml:id="reflection.intro">
+ &reftitle.intro;
+ <para>
+ Classe de reflexão.
+ </para>
+ </section>
+<!-- }}} -->
+
+ <section xml:id="reflection.synopsis">
+ &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+ <classsynopsis>
+ <ooclass><classname>Reflection</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+ <classsynopsisinfo>
+ <ooclass>
+ <classname>Reflection</classname>
+ </ooclass>
+ </classsynopsisinfo>
+<!-- }}} -->
+
+ <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.reflection')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+ </classsynopsis>
+<!-- }}} -->
+
+ </section>
+
+ </partintro>
+
+ &reference.reflection.entities.reflection;
+
+</phpdoc:classref>
+
+<!-- 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
+-->
Index: pt_BR/reference/reflection/reflectionclass.xml
--- pt_BR/reference/reflection/reflectionclass.xml
+++ pt_BR/reference/reflection/reflectionclass.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 321705 Maintainer: Felipe Barth Status: ready -->
+<!-- Reviewed: no -->
+
+<phpdoc:classref xml:id="class.reflectionclass" xmlns:phpdoc="
http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="
http://www.w3.org/2001/XInclude">
+
+ <title>Classe ReflectionClass</title>
+ <titleabbrev>ReflectionClass</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ ReflectionClass intro -->
+ <section xml:id="reflectionclass.intro">
+ &reftitle.intro;
+ <para>
+ Classe <classname>ReflectionClass</classname>reporta
+ informações sobre uma classe.
+ </para>
+ </section>
+<!-- }}} -->
+
+ <section xml:id="reflectionclass.synopsis">
+ &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+ <classsynopsis>
+ <ooclass><classname>ReflectionClass</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+ <classsynopsisinfo>
+ <ooclass>
+ <classname>ReflectionClass</classname>
+ </ooclass>
+
+ <oointerface>
+ <interfacename>Reflector</interfacename>
+ </oointerface>
+ </classsynopsisinfo>
+<!-- }}} -->
+ <classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="reflectionclass.constants.is-implicit-abstract">ReflectionClass::IS_IMPLICIT_ABSTRACT</varname>
+ <initializer>16</initializer>
+ </fieldsynopsis>
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="reflectionclass.constants.is-explicit-abstract">ReflectionClass::IS_EXPLICIT_ABSTRACT</varname>
+ <initializer>32</initializer>
+ </fieldsynopsis>
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="reflectionclass.constants.is-final">ReflectionClass::IS_FINAL</varname>
+ <initializer>64</initializer>
+ </fieldsynopsis>
+
+ <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
+ <fieldsynopsis>
+ <modifier>public</modifier>
+ <varname linkend="reflectionclass.props.name">name</varname>
+ </fieldsynopsis>
+
+
+ <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.reflectionclass')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+ </classsynopsis>
+<!-- }}} -->
+
+ </section>
+
+
+<!-- {{{ ReflectionClass properties -->
+ <section xml:id="reflectionclass.props">
+ &reftitle.properties;
+ <variablelist>
+ <varlistentry xml:id="reflectionclass.props.name">
+ <term><varname>name</varname></term>
+ <listitem>
+ <para>
+ Nome da classe. Apenas leitura, gera
+ <classname>ReflectionException</classname> na tentativa de escrita.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+<!-- }}} -->
+
+
+<!-- {{{ ReflectionClass constants -->
+ <section xml:id="reflectionclass.constants">
+ &reftitle.constants;
+ <section xml:id="reflectionclass.constants.modifiers">
+ <title>Modificadores ReflectionClass</title>
+ <variablelist>
+
+ <varlistentry xml:id="reflectionclass.constants.is-implicit-abstract">
+
<term><constant>ReflectionClass::IS_IMPLICIT_ABSTRACT</constant></term>
+ <listitem>
+ <para>
+ Indica que a classe é <link linkend="language.oop5.abstract">
+ abstrata</link> pois possui alguns métodos abstratos.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="reflectionclass.constants.is-explicit-abstract">
+
<term><constant>ReflectionClass::IS_EXPLICIT_ABSTRACT</constant></term>
+ <listitem>
+ <para>
+ Indica que a classe é <link linkend="language.oop5.abstract">
+ abstrata</link> por causa da sua definição.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="reflectionclass.constants.is-final">
+ <term><constant>ReflectionClass::IS_FINAL</constant></term>
+ <listitem>
+ <para>
+ Indica classe<link linkend="language.oop5.final">final</link>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </section>
+ </section>
+<!-- }}} -->
+
+
+ </partintro>
+
+ &reference.reflection.entities.reflectionclass;
+
+</phpdoc:classref>
+
+<!-- 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
+-->
--
*Felipe Ismael Barth*Zend Certified Engineer PHP 5.3
<http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND020390>
(ZEND020390)Certified ITIL Foundation
<http://www.itil-officialsite.com/>
(16/01/2013)