File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ Here's the tl;dr of how to begin. For more detailed examples, see the [wiki](ht
2424require "vendor/autoload.php";
2525
2626// connect to CouchDB (does make a call to check we can connect)
27- $server = new \PHPCouchDB\Server([\PHPCouchDB\Server::OPTION_URL => "http://localhost:5984"]);
27+ $server = new \PHPCouchDB\Server(["url" => "http://localhost:5984"]);
2828
2929// get a list of databases; each one is a \PHPCouchDB\Database object
3030$databases = $server->getAllDbs();
3131
3232// work with the "test" database (also a \PHPCouchDB\Database object)
33- $test_db = $server->useDb([\PHPCouchDB\Server::OPTION_NAME => "test", \PHPCouchDB\Server::OPTION_CREATE_IF_NOT_EXISTS => true]);
33+ $test_db = $server->useDb(["name" => "test", "create_if_not_exists" => true]);
3434
3535// add a document - you may specify the "id" here if you like
3636$doc = $test_db->create(["name" => "Alice", "interests" => ["eating", "wondering"]]);
You can’t perform that action at this time.
0 commit comments