1 | <?php |
||
28 | class Mongo extends MongoClient |
||
29 | { |
||
30 | /** |
||
31 | * Dummy constructor to throw an exception |
||
32 | */ |
||
33 | public function __construct() |
||
37 | |||
38 | /** |
||
39 | * Get pool size for connection pools |
||
40 | * |
||
41 | * @link http://php.net/manual/en/mongo.getpoolsize.php |
||
42 | * @return int Returns the current pool size. |
||
43 | * |
||
44 | * @deprecated This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::getSize() instead. |
||
45 | */ |
||
46 | public function getPoolSize() |
||
50 | |||
51 | /** |
||
52 | * Returns the address being used by this for slaveOkay reads |
||
53 | * |
||
54 | * @link http://php.net/manual/en/mongo.getslave.php |
||
55 | * @return bool The address of the secondary this connection is using for |
||
56 | * reads. This returns NULL if this is not connected to a replica set or not yet |
||
57 | * initialized. |
||
58 | */ |
||
59 | public function getSlave() |
||
63 | |||
64 | /** |
||
65 | * Get slaveOkay setting for this connection |
||
66 | * |
||
67 | * @link http://php.net/manual/en/mongo.getslaveokay.php |
||
68 | * @return bool Returns the value of slaveOkay for this instance. |
||
69 | */ |
||
70 | public function getSlaveOkay() |
||
74 | |||
75 | /** |
||
76 | * Connects to paired database server |
||
77 | * |
||
78 | * @link http://www.php.net/manual/en/mongo.pairconnect.php |
||
79 | * @throws MongoConnectionException |
||
80 | * @return boolean |
||
81 | * |
||
82 | * @deprecated Pass a string of the form "mongodb://server1,server2" to the constructor instead of using this method. |
||
83 | */ |
||
84 | public function pairConnect() |
||
88 | |||
89 | /** |
||
90 | * Returns information about all connection pools. |
||
91 | * |
||
92 | * @link http://php.net/manual/en/mongo.pooldebug.php |
||
93 | * @return array |
||
94 | * @deprecated This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::info() instead. |
||
95 | */ |
||
96 | public function poolDebug() |
||
100 | |||
101 | /** |
||
102 | * Change slaveOkay setting for this connection |
||
103 | * |
||
104 | * @link http://php.net/manual/en/mongo.setslaveokay.php |
||
105 | * @param bool $ok |
||
106 | * @return bool returns the former value of slaveOkay for this instance. |
||
107 | */ |
||
108 | public function setSlaveOkay($ok) |
||
112 | |||
113 | /** |
||
114 | * Set the size for future connection pools. |
||
115 | * |
||
116 | * @link http://php.net/manual/en/mongo.setpoolsize.php |
||
117 | * @param $size <p>The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.</p> |
||
118 | * @return bool Returns the former value of pool size. |
||
119 | * @deprecated Relying on this feature is highly discouraged. Please use MongoPool::setSize() instead. |
||
120 | */ |
||
121 | public function setPoolSize($size) |
||
125 | |||
126 | /** |
||
127 | * Creates a persistent connection with a database server |
||
128 | * |
||
129 | * @link http://www.php.net/manual/en/mongo.persistconnect.php |
||
130 | * @param string $username A username used to identify the connection. |
||
131 | * @param string $password A password used to identify the connection. |
||
132 | * @throws MongoConnectionException |
||
133 | * @return boolean If the connection was successful. |
||
134 | * @deprecated Pass array("persist" => $id) to the constructor instead of using this method. |
||
135 | */ |
||
136 | public function persistConnect($username = "", $password = "") |
||
140 | |||
141 | /** |
||
142 | * Creates a persistent connection with paired database servers |
||
143 | * |
||
144 | * @link http://www.php.net/manual/en/mongo.pairpersistconnect.php |
||
145 | * @param string $username A username used to identify the connection. |
||
146 | * @param string $password A password used to identify the connection. |
||
147 | * @throws MongoConnectionException |
||
148 | * @return boolean If the connection was successful. |
||
149 | * @deprecated Pass "mongodb://server1,server2" and array("persist" => $id) to the constructor instead of using this method. |
||
150 | */ |
||
151 | public function pairPersistConnect($username = "", $password = "") |
||
155 | |||
156 | /** |
||
157 | * Connects with a database server |
||
158 | * |
||
159 | * @link http://www.php.net/manual/en/mongo.connectutil.php |
||
160 | * @throws MongoConnectionException |
||
161 | * @return boolean If the connection was successful. |
||
162 | */ |
||
163 | protected function connectUtil() |
||
167 | |||
168 | /** |
||
169 | * Check if there was an error on the most recent db operation performed |
||
170 | * |
||
171 | * @link http://www.php.net/manual/en/mongo.lasterror.php |
||
172 | * @return array|null Returns the error, if there was one, or NULL. |
||
173 | * @deprecated Use MongoDB::lastError() instead. |
||
174 | */ |
||
175 | public function lastError() |
||
179 | |||
180 | /** |
||
181 | * Checks for the last error thrown during a database operation |
||
182 | * |
||
183 | * @link http://www.php.net/manual/en/mongo.preverror.php |
||
184 | * @return array Returns the error and the number of operations ago it occurred. |
||
185 | * @deprecated Use MongoDB::prevError() instead. |
||
186 | */ |
||
187 | public function prevError() |
||
191 | |||
192 | /** |
||
193 | * Clears any flagged errors on the connection |
||
194 | * |
||
195 | * @link http://www.php.net/manual/en/mongo.reseterror.php |
||
196 | * @return array Returns the database response. |
||
197 | * @deprecated Use MongoDB::resetError() instead. |
||
198 | */ |
||
199 | public function resetError() |
||
203 | |||
204 | /** |
||
205 | * Choose a new secondary for slaveOkay reads |
||
206 | * |
||
207 | * @link www.php.net/manual/en/mongo.switchslave.php |
||
208 | * @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. |
||
209 | * @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). |
||
210 | */ |
||
211 | public function switchSlave() |
||
215 | |||
216 | /** |
||
217 | * Creates a database error on the database. |
||
218 | * |
||
219 | * @link http://www.php.net/manual/en/mongo.forceerror.php |
||
220 | * @return boolean The database response. |
||
221 | * @deprecated Use MongoDB::forceError() instead. |
||
222 | */ |
||
223 | public function forceError() |
||
227 | |||
228 | protected function notImplemented() |
||
232 | } |
||
233 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.