PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

The MongoDB\BSON\Persistable interface | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

The MongoDB\BSON\Persistable interface

(mongodb >=1.0.0)

はじめに

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.

注意:

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.

インターフェイス概要

MongoDB\BSON\Persistable implements MongoDB\BSON\Unserializable , MongoDB\BSON\Serializable {
/* 継承したメソッド */
abstract public array|object MongoDB\BSON\Serializable::bsonSerialize ( void )
abstract public void MongoDB\BSON\Unserializable::bsonUnserialize ( array $data )
}

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「The MongoDB\BSON\Persistable interface」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | The MongoDB\BSON\Persistable interface」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: