@@ -48,17 +48,18 @@ PHONGO_API zend_class_entry *php_phongo_server_ce;
4848zend_object_handlers php_phongo_handler_server ;
4949
5050
51- /* {{{ proto MongoDB\Driver\Server Server::__construct()
52- Throws exception -- can only be created internally */
51+ /* {{{ proto void Server::__construct()
52+ Throws MongoDB\Driver\RuntimeException ( can only be created internally) */
5353PHP_METHOD (Server , __construct )
5454{
5555 SUPPRESS_UNUSED_WARNING (return_value ) SUPPRESS_UNUSED_WARNING (return_value_used ) SUPPRESS_UNUSED_WARNING (return_value_ptr ) (void )ZEND_NUM_ARGS (); (void )getThis ();
5656
5757 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Accessing private constructor ");
5858}
5959/* }}} */
60+
6061/* {{{ proto MongoDB\Driver\Cursor Server::executeCommand(string $db, MongoDB\Driver\Command $command[, MongoDB\Driver\ReadPreference $readPreference = null]))
61- Executes a command on this server */
62+ Executes a Command on this Server */
6263PHP_METHOD (Server , executeCommand )
6364{
6465 php_phongo_server_t * intern ;
@@ -83,8 +84,9 @@ PHP_METHOD(Server, executeCommand)
8384#endif
8485}
8586/* }}} */
87+
8688/* {{{ proto MongoDB\Driver\Cursor Server::executeQuery(string $namespace, MongoDB\Driver\Query $query[, MongoDB\Driver\ReadPreference $readPreference = null]))
87- Executes a Query */
89+ Executes a Query on this Server */
8890PHP_METHOD (Server , executeQuery )
8991{
9092 php_phongo_server_t * intern ;
@@ -109,8 +111,10 @@ PHP_METHOD(Server, executeQuery)
109111#endif
110112}
111113/* }}} */
114+
112115/* {{{ proto MongoDB\Driver\WriteResult Server::executeBulkWrite(string $namespace, MongoDB\Driver\BulkWrite $zbulk[, MongoDB\Driver\WriteConcern $writeConcern = null])
113- Executes a write operation bulk (e.g. insert, update, delete) */
116+ Executes a BulkWrite (i.e. any number of insert, update, and delete ops) on
117+ this Server */
114118PHP_METHOD (Server , executeBulkWrite )
115119{
116120 php_phongo_server_t * intern ;
@@ -138,8 +142,9 @@ PHP_METHOD(Server, executeBulkWrite)
138142#endif
139143}
140144/* }}} */
145+
141146/* {{{ proto string Server::getHost()
142- Returns the hostname used to connect to this Server */
147+ Returns the hostname for this Server */
143148PHP_METHOD (Server , getHost )
144149{
145150 php_phongo_server_t * intern ;
@@ -161,8 +166,9 @@ PHP_METHOD(Server, getHost)
161166 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
162167}
163168/* }}} */
169+
164170/* {{{ proto array Server::getTags()
165- Returns the currently configured tags for this node */
171+ Returns the currently configured tags for this Server */
166172PHP_METHOD (Server , getTags )
167173{
168174 php_phongo_server_t * intern ;
@@ -208,8 +214,9 @@ PHP_METHOD(Server, getTags)
208214 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
209215}
210216/* }}} */
217+
211218/* {{{ proto array Server::getInfo()
212- Returns the last isMaster() result document */
219+ Returns the last isMaster result document for this Server */
213220PHP_METHOD (Server , getInfo )
214221{
215222 php_phongo_server_t * intern ;
@@ -244,8 +251,9 @@ PHP_METHOD(Server, getInfo)
244251 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
245252}
246253/* }}} */
254+
247255/* {{{ proto integer Server::getLatency()
248- Returns the last messured latency */
256+ Returns the last messured latency for this Server */
249257PHP_METHOD (Server , getLatency )
250258{
251259 php_phongo_server_t * intern ;
@@ -268,8 +276,9 @@ PHP_METHOD(Server, getLatency)
268276 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
269277}
270278/* }}} */
279+
271280/* {{{ proto integer Server::getPort()
272- Returns the port used to create this Server */
281+ Returns the port for this Server */
273282PHP_METHOD (Server , getPort )
274283{
275284 php_phongo_server_t * intern ;
@@ -292,6 +301,7 @@ PHP_METHOD(Server, getPort)
292301 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
293302}
294303/* }}} */
304+
295305/* {{{ proto integer Server::getType()
296306 Returns the node type of this Server */
297307PHP_METHOD (Server , getType )
@@ -316,8 +326,9 @@ PHP_METHOD(Server, getType)
316326 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
317327}
318328/* }}} */
329+
319330/* {{{ proto bool Server::isPrimary()
320- Checks if this is a special "Primary" member of a RepilcaSet */
331+ Returns whether this Server is a primary member of a replica set */
321332PHP_METHOD (Server , isPrimary )
322333{
323334 php_phongo_server_t * intern ;
@@ -340,8 +351,9 @@ PHP_METHOD(Server, isPrimary)
340351 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
341352}
342353/* }}} */
354+
343355/* {{{ proto bool Server::isSecondary()
344- Checks if this is a special "Secondary" member of a RepilcaSet */
356+ Returns whether this Server is a secondary member of a replica set */
345357PHP_METHOD (Server , isSecondary )
346358{
347359 php_phongo_server_t * intern ;
@@ -364,8 +376,9 @@ PHP_METHOD(Server, isSecondary)
364376 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
365377}
366378/* }}} */
379+
367380/* {{{ proto bool Server::isArbiter()
368- Checks if this is a special "Arbiter" member of a RepilcaSet */
381+ Returns whether this Server is an arbiter member of a replica set */
369382PHP_METHOD (Server , isArbiter )
370383{
371384 php_phongo_server_t * intern ;
@@ -388,8 +401,9 @@ PHP_METHOD(Server, isArbiter)
388401 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
389402}
390403/* }}} */
404+
391405/* {{{ proto bool Server::isHidden()
392- Checks if this is a special " hidden" member of a RepilcaSet */
406+ Returns whether this Server is a hidden member of a replica set */
393407PHP_METHOD (Server , isHidden )
394408{
395409 php_phongo_server_t * intern ;
@@ -414,8 +428,9 @@ PHP_METHOD(Server, isHidden)
414428 phongo_throw_exception (PHONGO_ERROR_RUNTIME TSRMLS_CC , "Failed to get server description" );
415429}
416430/* }}} */
431+
417432/* {{{ proto bool Server::isPassive()
418- Checks if this is a special passive node member of a ReplicaSet */
433+ Returns whether this Server is a passive member of a replica set */
419434PHP_METHOD (Server , isPassive )
420435{
421436 php_phongo_server_t * intern ;
0 commit comments