The MongoDB\BSON\Persistable interface

(mongodb >=1.0.0)

Einführung

Classes may implement this interface to take advantage of automatic ODM (object document mapping) behavior in the driver. During serialization, the driver will inject a __pclass property containing the PHP class name into the data returned by MongoDB\BSON\Serializable::bsonSerialize(). During unserialization, the same __pclass property will then be used to infer the PHP class (independent of any type map configuration) to be constructed before MongoDB\BSON\Unserializable::bsonUnserialize() is invoked. See Persisting Data for additional information.

Hinweis: Even if MongoDB\BSON\Serializable::bsonSerialize() would return a sequential array, injection of the __pclass property will cause the object to be serialized as a BSON document.

Interface-Übersicht

class MongoDB\BSON\Persistable implements MongoDB\BSON\Unserializable, MongoDB\BSON\Serializable {
/* Geerbte Methoden */
abstract public MongoDB\BSON\Serializable::bsonSerialize(): array|object
abstract public MongoDB\BSON\Unserializable::bsonUnserialize(array $data): void
}

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

MMOEXP: Diablo 4 is joyfully celebrating its third anniversary with in-game

The world of Sanctuary is experiencing two very different moods. On one hand, Diablo 4 Gold (https://www.mmoexp.com/Diablo-4/Gold.html?fsid=242182 ...

Geschrieben von Ludwighench am 09.06.2026 10:56:15
Forum: Ankündigungen
MMOEXP: Path of Exile 2's 0.5 update is a bold, messy, and exciting

The Path of Exile 2 Orbs (https://www.mmoexp.com/Poe-2/Currency.html?fsid=961106)​ community is buzzing with excitement and controversy followin ...

Geschrieben von Ludwighench am 09.06.2026 10:50:53
Forum: Ankündigungen
MMOexp Path of Exile 2: Massive Currency Farm with this Abyss Strategy

Struggling to Earn Divine Orbs? This Low-Investment Abyss Strategy Could Be the Answer Making currency in Path of Exile 2's endgame often feels l ...

Geschrieben von Lilidala am 09.06.2026 10:47:34
Forum: Fragen/Vorschläge zum Forum
MMOEXP: FC 26 is making headlines with its largest free content

FC 26 Coins (https://www.mmoexp.com/Fc-26/Coins.html?fsid=254377)​ is making headlines with its largest free content drop since launch: "The Wor ...

Geschrieben von Ludwighench am 09.06.2026 10:44:27
Forum: Ankündigungen