Преглед изворни кода

Move method to correct class

Andreas Braun пре 10 година
родитељ
комит
25a62fcda1
2 измењених фајлова са 12 додато и 12 уклоњено
  1. 12 0
      lib/Mongo/Mongo.php
  2. 0 12
      lib/Mongo/MongoClient.php

+ 12 - 0
lib/Mongo/Mongo.php

@@ -198,6 +198,18 @@ class Mongo extends MongoClient
     }
 
     /**
+     * Choose a new secondary for slaveOkay reads
+     *
+     * @link www.php.net/manual/en/mongo.switchslave.php
+     * @return string The address of the secondary this connection is using for reads. This may be the same as the previous address as addresses are randomly chosen. It may return only one address if only one secondary (or only the primary) is available.
+     * @throws MongoException (error code 15) if it is called on a non-replica-set connection. It will also throw MongoExceptions if it cannot find anyone (primary or secondary) to read from (error code 16).
+     */
+    public function switchSlave()
+    {
+        $this->notImplemented();
+    }
+
+    /**
      * Creates a database error on the database.
      *
      * @link http://www.php.net/manual/en/mongo.forceerror.php

+ 0 - 12
lib/Mongo/MongoClient.php

@@ -291,18 +291,6 @@ class MongoClient
     }
 
     /**
-     * Choose a new secondary for slaveOkay reads
-     *
-     * @link www.php.net/manual/en/mongo.switchslave.php
-     * @return string The address of the secondary this connection is using for reads. This may be the same as the previous address as addresses are randomly chosen. It may return only one address if only one secondary (or only the primary) is available.
-     * @throws MongoException (error code 15) if it is called on a non-replica-set connection. It will also throw MongoExceptions if it cannot find anyone (primary or secondary) to read from (error code 16).
-     */
-    public function switchSlave()
-    {
-        $this->notImplemented();
-    }
-
-    /**
      * String representation of this connection
      *
      * @link http://www.php.net/manual/en/mongoclient.tostring.php