svn: /phpdoc/pt_BR/trunk/language/predefined/ weakreference.xml

[email protected] (Daniel Rodrigues Lima)
Newsgroups php.doc.pt-br
Message-ID <[email protected]>
geekcom                                  Thu, 19 Dec 2019 20:09:48 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=348595

Log:
new: language/predefined/weakreference.xml

Changed paths:
    A   phpdoc/pt_BR/trunk/language/predefined/weakreference.xml

Added: phpdoc/pt_BR/trunk/language/predefined/weakreference.xml
===================================================================
--- phpdoc/pt_BR/trunk/language/predefined/weakreference.xml	                        (rev 0)
+++ phpdoc/pt_BR/trunk/language/predefined/weakreference.xml	2019-12-19 20:09:48 UTC (rev 348595)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 347473 Maintainer: geekcom Status: ready --><!-- CREDITS: geekcom -->
+
+<phpdoc:classref xml:id="class.weakreference" 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>A classe WeakReference</title>
+ <titleabbrev>WeakReference</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ WeakReference intro -->
+  <section xml:id="weakreference.intro">
+   &reftitle.intro;
+   <para>
+    Referências fracas permitem que o programador mantenha uma referência a um objeto que não impede
+    que o objeto seja destruído. Eles são úteis para implementar estruturas como cache.
+   </para>
+   <note>
+    <para>
+     A classe <classname>WeakReference</classname> não deve ser confundida com a classe
+     <classname>WeakRef</classname> da extensão <link linkend="class.weakref">Weakref</link>.
+    </para>
+   </note>
+   <para>
+    <classname>WeakReference</classname>s não podem ser serializadas.
+   </para>
+  </section>
+<!-- }}} -->
+
+  <section xml:id="weakreference.synopsis">
+   &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+   <classsynopsis>
+    <ooclass><classname>WeakReference</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+    <classsynopsisinfo>
+     <ooclass>
+      <classname>WeakReference</classname>
+     </ooclass>
+    </classsynopsisinfo>
+<!-- }}} -->
+
+    <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
+    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.weakreference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])">
+     <xi:fallback />
+    </xi:include>
+    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.weakreference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
+     <xi:fallback />
+    </xi:include>
+   </classsynopsis>
+<!-- }}} -->
+
+  </section>
+
+  <section xml:id="weakreference.examples">
+   <title>Exemplos de referência fraca</title>
+   <para>
+    <example xml:id="weakreference.basic-example">
+     <title>Uso básico de referência fraca</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$obj = new stdClass;
+$weakref = WeakReference::create($obj);
+var_dump($weakref->get());
+unset($obj);
+var_dump($weakref->get());
+?>
+]]>
+     </programlisting>
+     &example.outputs.similar;
+     <screen>
+<![CDATA[
+object(stdClass)#1 (0) {
+}
+NULL
+]]>
+     </screen>
+    </example>
+   </para>
+  </section>
+
+ </partintro>
+
+ &language.predefined.weakreference.construct;
+ &language.predefined.weakreference.create;
+ &language.predefined.weakreference.get;
+
+</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
+-->
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.