소스 검색

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