Files
mongo-php-driver/docs/api/MongoDB/Command/CommandResult.php
2014-06-19 14:15:32 -07:00

47 lines
989 B
PHP

<?php
namespace MongoDB\Command;
use MongoDB\Server;
/**
* Result returned by Server and Manager executeCommand() methods.
*/
final class CommandResult
{
private $server;
private $responseDocument;
/**
* Constructs a new CommandResult
*
* @param Server $server
* @param array|object $responseDocument
*/
public function __construct(Server $server, $responseDocument)
{
$this->server = $server;
$this->responseDocument = $responseDocument;
}
/**
* Returns the original response document from the server
*
* @return array Original response document from the server
*/
public function getResponseDocument()
{
return $this->responseDocument;
}
/**
* Returns the Server object that this cursor is attached to
*
* @return Server Server from which the result originated
*/
public function getServer()
{
return $this->server;
}
}