From 6c891e6655151a2d0da9451c14a86bf3d4f73cc9 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Thu, 10 Aug 2017 22:56:40 +0000 Subject: [PATCH] Use semantic tags and entities for interfaces git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342834 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongodb/architecture.xml | 49 ++++++++++--------- reference/mongodb/bson/persistable.xml | 2 +- reference/mongodb/bson/serializable.xml | 2 +- .../bson/serializable/bsonserialize.xml | 9 ++-- reference/mongodb/bson/type.xml | 2 +- reference/mongodb/bson/unserializable.xml | 2 +- .../bson/unserializable/bsonunserialize.xml | 2 +- reference/mongodb/functions/bson/fromphp.xml | 2 +- reference/mongodb/functions/bson/tophp.xml | 2 +- .../mongodb/driver/bulkwrite/insert.xml | 2 +- 10 files changed, 39 insertions(+), 35 deletions(-) diff --git a/reference/mongodb/architecture.xml b/reference/mongodb/architecture.xml index b166f17cc0..7a7d7bead2 100644 --- a/reference/mongodb/architecture.xml +++ b/reference/mongodb/architecture.xml @@ -324,18 +324,18 @@ foreach ($managers as $manager) { If an object is a supported class that implements - MongoDB\BSON\Type, then use the BSON + MongoDB\BSON\Type, then use the BSON serialization logic for that specific type. - MongoDB\BSON\Type instances (excluding - MongoDB\BSON\Serializable may only be serialized - as a document field value. Attempting to serialize such an object as a - root document will throw a + MongoDB\BSON\Type instances (excluding + MongoDB\BSON\Serializable may only be + serialized as a document field value. Attempting to serialize such an + object as a root document will throw a MongoDB\Driver\Exception\UnexpectedValueException If an object is of an unknown class implementing the - MongoDB\BSON\Type interface, then throw a + MongoDB\BSON\Type interface, then throw a MongoDB\Driver\Exception\UnexpectedValueException @@ -349,7 +349,7 @@ foreach ($managers as $manager) { If an object is of a class that implements the - MongoDB\BSON\Serializable interface, call + MongoDB\BSON\Serializable interface, call MongoDB\BSON\Serializable::bsonSerialize and use the returned array or stdClass to serialize as a BSON document or array. The BSON type will be determined by the following: @@ -363,8 +363,9 @@ foreach ($managers as $manager) { - MongoDB\BSON\Persistable objects must be - serialized as a BSON document. + + MongoDB\BSON\Persistable objects must be + serialized as a BSON document. @@ -393,9 +394,9 @@ foreach ($managers as $manager) { If an object is of a class that implements the - MongoDB\BSON\Persistable interface (which implies - MongoDB\BSON\Serializable obtain the properties - in a similar way as in the previous paragraphs, but + MongoDB\BSON\Persistable interface (which + implies MongoDB\BSON\Serializable), obtain + the properties in a similar way as in the previous paragraphs, but also add an additional property __pclass as a Binary value, with subtype 0x80 and data bearing the fully qualified class name @@ -410,9 +411,9 @@ foreach ($managers as $manager) { the MongoDB\BSON\Serializable::bsonSerialize return value. If you want to avoid this behaviour and set your own __pclass value, you must not - implement MongoDB\BSON\Persistable and should - instead implement MongoDB\BSON\Serializable - directly. + implement MongoDB\BSON\Persistable and + should instead implement + MongoDB\BSON\Serializable directly.
@@ -586,8 +587,8 @@ class UpperClass implements MongoDB\BSON\Persistable { If the named class implements the - MongoDB\BSON\Persistable interface, then the - properties of the BSON document, including the + MongoDB\BSON\Persistable interface, + then the properties of the BSON document, including the __pclass property, are sent as an associative array to the MongoDB\BSON\Unserializable::bsonUnserialize @@ -595,7 +596,7 @@ class UpperClass implements MongoDB\BSON\Persistable { If the named class does not exist or does not implement the - MongoDB\BSON\Persistable interface, + MongoDB\BSON\Persistable interface, stdClass will be used and each BSON document key (including __pclass) will be set as a public stdClass property. @@ -644,7 +645,7 @@ class UpperClass implements MongoDB\BSON\Persistable { If the named class does not exist, is not concrete (i.e. it is abstract or an interface), or does not implement - MongoDB\BSON\Unserializable then an + MongoDB\BSON\Unserializable then an MongoDB\Driver\Exception\InvalidArgumentException exception is thrown. @@ -652,8 +653,8 @@ class UpperClass implements MongoDB\BSON\Persistable { If the BSON object has a __pclass property and that class exists and implements - MongoDB\BSON\Persistable it will supersede the - class provided in the type map. + MongoDB\BSON\Persistable it will + supersede the class provided in the type map. @@ -708,7 +709,8 @@ class UpperClass implements MongoDB\BSON\Persistable { YourClass - which implements MongoDB\BSON\Unserializable + which implements + MongoDB\BSON\Unserializable @@ -716,7 +718,8 @@ class UpperClass implements MongoDB\BSON\Persistable { OurClass - which implements MongoDB\BSON\Persistable + which implements + MongoDB\BSON\Persistable diff --git a/reference/mongodb/bson/persistable.xml b/reference/mongodb/bson/persistable.xml index dc0dd2b566..a170449199 100644 --- a/reference/mongodb/bson/persistable.xml +++ b/reference/mongodb/bson/persistable.xml @@ -36,7 +36,7 @@
- &reftitle.classsynopsis; + &reftitle.interfacesynopsis; diff --git a/reference/mongodb/bson/serializable.xml b/reference/mongodb/bson/serializable.xml index 2f923b0b66..9bf6e0d8f8 100644 --- a/reference/mongodb/bson/serializable.xml +++ b/reference/mongodb/bson/serializable.xml @@ -19,7 +19,7 @@
- &reftitle.classsynopsis; + &reftitle.interfacesynopsis; diff --git a/reference/mongodb/bson/serializable/bsonserialize.xml b/reference/mongodb/bson/serializable/bsonserialize.xml index 6a02c07874..34e2c58cb8 100644 --- a/reference/mongodb/bson/serializable/bsonserialize.xml +++ b/reference/mongodb/bson/serializable/bsonserialize.xml @@ -18,9 +18,10 @@ array or stdClass. - Root documents (e.g. a MongoDB\BSON\Serializable - passed to MongoDB\BSON\fromPHP) will always be - serialized as a BSON document. For field values, associative arrays and + Root documents (e.g. a + MongoDB\BSON\Serializable passed to + MongoDB\BSON\fromPHP) will always be serialized as a + BSON document. For field values, associative arrays and stdClass instances will be serialized as a BSON document and sequential arrays (i.e. sequential, numeric indexes starting at 0) will be serialized as a BSON array. @@ -178,7 +179,7 @@ echo MongoDB\BSON\toJSON($bson), "\n"; &reftitle.seealso; MongoDB\BSON\Unserializable::bsonUnserialize - MongoDB\BSON\Persistable + MongoDB\BSON\Persistable diff --git a/reference/mongodb/bson/type.xml b/reference/mongodb/bson/type.xml index 9d2bb88a02..9f8a71f2a4 100644 --- a/reference/mongodb/bson/type.xml +++ b/reference/mongodb/bson/type.xml @@ -18,7 +18,7 @@
- &reftitle.classsynopsis; + &reftitle.interfacesynopsis; diff --git a/reference/mongodb/bson/unserializable.xml b/reference/mongodb/bson/unserializable.xml index 565d003d84..c4ae5f0d38 100644 --- a/reference/mongodb/bson/unserializable.xml +++ b/reference/mongodb/bson/unserializable.xml @@ -20,7 +20,7 @@
- &reftitle.classsynopsis; + &reftitle.interfacesynopsis; diff --git a/reference/mongodb/bson/unserializable/bsonunserialize.xml b/reference/mongodb/bson/unserializable/bsonunserialize.xml index fb87e693a6..24895f048d 100644 --- a/reference/mongodb/bson/unserializable/bsonunserialize.xml +++ b/reference/mongodb/bson/unserializable/bsonunserialize.xml @@ -98,7 +98,7 @@ object(MyDocument)#1 (1) { &reftitle.seealso; MongoDB\BSON\Serializable::bsonSerialize - MongoDB\BSON\Persistable + MongoDB\BSON\Persistable diff --git a/reference/mongodb/functions/bson/fromphp.xml b/reference/mongodb/functions/bson/fromphp.xml index 16d542bd71..187592c07f 100644 --- a/reference/mongodb/functions/bson/fromphp.xml +++ b/reference/mongodb/functions/bson/fromphp.xml @@ -49,7 +49,7 @@ MongoDB\Driver\Exception\UnexpectedValueException if the PHP value cannot be converted to BSON. Possible reasons include, but are not limited to, encountering an unexpected - MongoDB\BSON\Type instance or + MongoDB\BSON\Type instance or MongoDB\BSON\Serializable::bsonSerialize failing to return an array or stdClass. diff --git a/reference/mongodb/functions/bson/tophp.xml b/reference/mongodb/functions/bson/tophp.xml index 3004c5d56d..d025823a51 100644 --- a/reference/mongodb/functions/bson/tophp.xml +++ b/reference/mongodb/functions/bson/tophp.xml @@ -50,7 +50,7 @@ Throws MongoDB\Driver\Exception\InvalidArgumentException if a class in the type map cannot be instantiated or does not implement - MongoDB\BSON\Unserializable. + MongoDB\BSON\Unserializable. Throws diff --git a/reference/mongodb/mongodb/driver/bulkwrite/insert.xml b/reference/mongodb/mongodb/driver/bulkwrite/insert.xml index 127d153acc..1f056510cd 100644 --- a/reference/mongodb/mongodb/driver/bulkwrite/insert.xml +++ b/reference/mongodb/mongodb/driver/bulkwrite/insert.xml @@ -124,7 +124,7 @@ NULL MongoDB\Driver\Manager::executeBulkWrite MongoDB\Driver\WriteResult MongoDB\BSON\ObjectID - MongoDB\BSON\Persistable + MongoDB\BSON\Persistable