Server
final class Server (View source)
Constants
| TYPE_UNKNOWN | 
 | 
| TYPE_STANDALONE | 
 | 
| TYPE_MONGOS | 
 | 
| TYPE_POSSIBLE_PRIMARY | 
 | 
| TYPE_RS_PRIMARY | 
 | 
| TYPE_RS_SECONDARY | 
 | 
| TYPE_RS_ARBITER | 
 | 
| TYPE_RS_OTHER | 
 | 
| TYPE_RS_GHOST | 
 | 
| TYPE_LOAD_BALANCER
                                            Since: 1.11.0 | 
 | 
Methods
No description
Execute one or more write operations on this server
Execute write operations on this server using the bulkWrite command
Execute a database command on this server
Execute a database command that reads on this server
Execute a database command that reads and writes on this server
Execute a database command that writes on this server
Execute a database query on this server
Returns the hostname of this server
Returns an array of information about this server
Returns the latency of this server
Returns the port on which this server is listening
Returns a ServerDescription for this server https://www.php.net/manual/en/mongodb-driver-server.getserverdescription.php
Returns an array of tags describing this server in a replica set
Returns an integer denoting the type of this server
Checks if this server is an arbiter member of a replica set
Checks if this server is a hidden member of a replica set
Checks if this server is a passive member of a replica set
Checks if this server is a primary member of a replica set
Checks if this server is a secondary member of a replica set
Details
        
        final                    
    __wakeup()
        
    
    No description
        
        final                    WriteResult
    executeBulkWrite(string $namespace, BulkWrite $bulkWrite, array|null $options = null)
        
    
    Execute one or more write operations on this server
        
        final                    BulkWriteCommandResult
    executeBulkWriteCommand(BulkWriteCommand $bulkWriteCommand, array|null $options = null)
        
    
    Execute write operations on this server using the bulkWrite command
        
        final                    CursorInterface
    executeCommand(string $db, Command $command, array|null $options = null)
        
    
    Execute a database command on this server
        
        final                    CursorInterface
    executeReadCommand(string $db, Command $command, array|null $options = null)
        
    
    Execute a database command that reads on this server
        
        final                    CursorInterface
    executeReadWriteCommand(string $db, Command $command, array|null $options = null)
        
    
    Execute a database command that reads and writes on this server
        
        final                    CursorInterface
    executeWriteCommand(string $db, Command $command, array|null $options = null)
        
    
    Execute a database command that writes on this server
        
        final                    CursorInterface
    executeQuery(string $namespace, Query $query, ReadPreference|null $options = null)
        
    
    Execute a database query on this server
        
        final                    string
    getHost()
        
    
    Returns the hostname of this server
        
        final                    array
    getInfo()
        
    
    Returns an array of information about this server
        
        final                    int
    getLatency()
        
    
    Returns the latency of this server
        
        final                    int
    getPort()
        
    
    Returns the port on which this server is listening
        
        final                    ServerDescription
    getServerDescription()
        
    
    Returns a ServerDescription for this server https://www.php.net/manual/en/mongodb-driver-server.getserverdescription.php
        
        final                    array
    getTags()
        
    
    Returns an array of tags describing this server in a replica set
        
        final                    int
    getType()
        
    
    Returns an integer denoting the type of this server
        
        final                    bool
    isArbiter()
        
    
    Checks if this server is an arbiter member of a replica set
        
        final                    bool
    isHidden()
        
    
    Checks if this server is a hidden member of a replica set
        
        final                    bool
    isPassive()
        
    
    Checks if this server is a passive member of a replica set
        
        final                    bool
    isPrimary()
        
    
    Checks if this server is a primary member of a replica set
        
        final                    bool
    isSecondary()
        
    
    Checks if this server is a secondary member of a replica set