Files
doc-fr/reference/mongodb/bson/persistable.xml
Jean-Baptiste Nahan 9858a3062a Sync with EN
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@345179 c90b9560-bf6c-de11-be94-00142212c4b1
2018-06-21 20:45:36 +00:00

94 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 0f19fd56d91bf2324083913698dfeb01312fb15c Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<phpdoc:classref xml:id="class.mongodb-bson-persistable" 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>La classe MongoDB\BSON\Persistable</title>
<titleabbrev>MongoDB\BSON\Persistable</titleabbrev>
<partintro>
<!-- {{{ MongoDB\BSON\Persistable intro -->
<section xml:id="mongodb-bson-persistable.intro">
&reftitle.intro;
<para>
Les classes peuvent implémenter cette interface pour avoir la possibilité
d'utiliser les ODM automatique (les objets de cartographie des documents)
de ce driver. Pendant la linéarisation, le driver va injecter une propriété
<property>__pclass</property> contenant le nom de la classe PHP dans les données
retournées par <function>MongoDB\BSON\Serializable::bsonSerialize</function>.
Pendant la dé-linéarisation, la même propriété <property>__pclass</property>
sera utilisée pour demander à la classe PHP (indépendamment de la configuration
<link linkend="mongodb.persistence.typemaps">type map</link>) de se construire
avant que <function>MongoDB\BSON\Unserializable::bsonUnserialize</function> ne
soit invoquée. Voir <xref linkend="mongodb.persistence"/> pour plus d'informations.
</para>
<note>
<simpara>
Même si <function>MongoDB\BSON\Serializable::bsonSerialize</function>
veut retourner un tableau séquentiel, l'injection de la propriété
<property>__pclass</property> fera que l'objet sera linéarisé comme
document BSON.
</simpara>
</note>
</section>
<!-- }}} -->
<section xml:id="mongodb-bson-persistable.synopsis">
&reftitle.interfacesynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoDB\BSON\Persistable</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoDB\BSON\Persistable</classname>
</ooclass>
<oointerface>
<interfacename>MongoDB\BSON\Unserializable</interfacename>
</oointerface>
<oointerface>
<interfacename>MongoDB\BSON\Serializable</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-bson-serializable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-bson-unserializable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
</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
-->