Skip to content

Commit 4773e62

Browse files
committed
PHP-1331: Implement Collection::getDatabaseName() and Collection::getCollectionName()
1 parent 64d338a commit 4773e62

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Collection.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,13 @@ protected function _runCommand($dbname, array $cmd, ReadPreference $rp = null) {
654654
//var_dump(\BSON\toJSON(\BSON\fromArray($cmd)));
655655
$command = new Command($cmd);
656656
return $this->manager->executeCommand($dbname, $command, $rp);
657-
} /* }}} */
657+
}
658+
659+
function getCollectionName() {
660+
return $this->collname;
661+
}
662+
function getDatabaseName() {
663+
return $this->dbname;
664+
}
658665
}
659666

0 commit comments

Comments
 (0)