From a693a9fddb9294917d6efc65bc96d451548ad7ca Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Thu, 17 Dec 2015 22:00:06 +0000 Subject: [PATCH] Fix method references in MongoDB driver docs git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338288 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongodb/architecture.xml | 60 ++++++++++--------- .../writeexception/getwriteresult.xml | 4 +- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/reference/mongodb/architecture.xml b/reference/mongodb/architecture.xml index ad01e106ab..c9c14b4491 100644 --- a/reference/mongodb/architecture.xml +++ b/reference/mongodb/architecture.xml @@ -231,9 +231,9 @@ If an object is of a class that implements the MongoDB\BSON\Serializable interface, call - 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: + 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: @@ -249,21 +249,24 @@ - If bsonSerialize returns a packed - array, serialize as a BSON array. + + If MongoDB\BSON\Serializable::bsonSerialize + returns a packed array, serialize as a BSON array. - If bsonSerialize returns a non-packed - array or stdClass, serialize as a BSON - document. + + If MongoDB\BSON\Serializable::bsonSerialize + returns a non-packed array or stdClass, + serialize as a BSON document. - If bsonSerialize did not return an - array or stdClass, throw an - MongoDB\Driver\Exception\UnexpectedValueException - exception. + + If MongoDB\BSON\Serializable::bsonSerialize + did not return an array or stdClass, throw an + MongoDB\Driver\Exception\UnexpectedValueException + exception. @@ -282,13 +285,15 @@ The __pclass property is added to the array or - object returned by bsonSerialize, which means - it will overwrite any __pclass key/property in the - 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. + object returned by + MongoDB\BSON\Serializable::bsonSerialize, which + means it will overwrite any __pclass key/property in + 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.
@@ -461,8 +466,9 @@ UpperClass implements MongoDB\BSON\Persistable { MongoDB\BSON\Persistable interface, then the properties of the BSON document, including the __pclass property, are sent as an associative - array to the bsonUnserialize function to - initialise the object's properties. + array to the + MongoDB\BSON\Unserializable::bsonUnserialize + function to initialise the object's properties. If the named class does not exist or does not implement the @@ -531,8 +537,8 @@ UpperClass implements MongoDB\BSON\Persistable { The properties of the BSON document, including the __pclass property if it exists, will be sent as an associative array to the - bsonUnserialize function to initialise the - object's properties. + MongoDB\BSON\Unserializable::bsonUnserialize + function to initialise the object's properties. @@ -603,10 +609,10 @@ UpperClass implements MongoDB\BSON\Persistable { - The bsonUnserialize method of YourClass, - OurClass, TheirClass iterate over the array and set the properties - without modifications. It also sets the - $unserialized property to true: + The MongoDB\BSON\Unserializable::bsonUnserialize + method of YourClass, OurClass, TheirClass iterate over the array and set + the properties without modifications. It also sets + the $unserialized property to true: function bsonUnserialize( array $map ) diff --git a/reference/mongodb/mongodb/driver/exception/writeexception/getwriteresult.xml b/reference/mongodb/mongodb/driver/exception/writeexception/getwriteresult.xml index 61bf51bb17..a09419d1b8 100644 --- a/reference/mongodb/mongodb/driver/exception/writeexception/getwriteresult.xml +++ b/reference/mongodb/mongodb/driver/exception/writeexception/getwriteresult.xml @@ -10,7 +10,7 @@ &reftitle.description; - final public MongoDB\Driver\WriteResultMongoDB\Driver\WriteException::getWriteResult + final public MongoDB\Driver\WriteResultMongoDB\Driver\Exception\WriteException::getWriteResult @@ -40,7 +40,7 @@ &reftitle.examples; - <function>MongoDB\Driver\WriteException::getWriteResult</function> example + <function>MongoDB\Driver\Exception\WriteException::getWriteResult</function> example