modified MongoDbCommand __toString output

This commit is contained in:
Anton Grebnev
2012-06-04 16:06:03 +04:00
parent f6e119d372
commit 950d1f4a9a
2 changed files with 14 additions and 14 deletions

View File

@ -97,7 +97,7 @@ class FindMongoCommand extends MongoDbCommand
public function __toString()
{
if ($this->checkParams()) {
$result = PHP_EOL . 'Collection: ' . $this->collection . PHP_EOL;
$result = PHP_EOL . 'Collection: ' . trim($this->collection, "\n") . PHP_EOL;
ob_start();
var_dump($this->condition);
$condition = ob_get_clean();
@ -143,7 +143,7 @@ class CountMongoCommand extends MongoDbCommand
public function __toString()
{
if ($this->checkParams()) {
$result = PHP_EOL . 'Collection: ' . $this->collection . PHP_EOL;
$result = PHP_EOL . 'Collection: ' . trim($this->collection, "\n") . PHP_EOL;
$result .= 'Type: COUNT' . PHP_EOL;
ob_start();
var_dump($this->condition);
@ -199,7 +199,7 @@ class InsertMongoCommand extends MongoDbCommand
public function __toString()
{
if ($this->checkParams()) {
$result = PHP_EOL . 'Collection: ' . $this->collection . PHP_EOL;
$result = PHP_EOL . 'Collection: ' . trim($this->collection, "\n") . PHP_EOL;
$result .= 'Type: INSERT' . PHP_EOL;
ob_start();
var_dump($this->data);
@ -248,7 +248,7 @@ class UpdateMongoCommand extends MongoDbCommand
public function __toString()
{
if ($this->checkParams()) {
$result = PHP_EOL . 'Collection: ' . $this->collection . PHP_EOL;
$result = PHP_EOL . 'Collection: ' . trim($this->collection, "\n") . PHP_EOL;
$result .= 'Type: UPDATE' . PHP_EOL;
ob_start();
var_dump($this->condition);
@ -294,7 +294,7 @@ class RemoveMongoCommand extends MongoDbCommand
public function __toString()
{
if ($this->checkParams()) {
$result = PHP_EOL . 'Collection: ' . $this->collection . PHP_EOL;
$result = PHP_EOL . 'Collection: ' . trim($this->collection, "\n") . PHP_EOL;
$result .= 'Type: REMOVE' . PHP_EOL;
ob_start();
var_dump($this->condition);
@ -335,7 +335,7 @@ class CommandMongoCommand extends MongoDbCommand
public function __toString()
{
if ($this->checkParams()) {
$result = PHP_EOL . 'Collection: ' . $this->collection . PHP_EOL;
$result = PHP_EOL . 'Collection: ' . trim($this->collection, "\n") . PHP_EOL;
$result .= 'Type: COMMAND' . PHP_EOL;
ob_start();
var_dump($this->command);