This is a wrapper around the rest api to make it simpler to utilize azure cosmosdb from your php services such as Wordpress, Symphony and Laravel.
For more information around the wrapper for Azure Cosmos DB. https://learn.microsoft.com/en-us/rest/api/cosmos-db/
Include cosmosdb/cosmosdb in your project, by adding it to your composer.json file.
{
"require": {
"cosmosdb/cosmosdb": "1.1.0"
}
}or by running
composer require cosmosdb/cosmosdbat the root of your project.
$database = new Database(
'host',
'primary_key'
);
$response = $database->get("DBNAME");$database = new Database(
'host',
'primary_key'
);
$response = $database->delete("DBNAME");$database = new Database(
'host',
'primary_key'
);
$response = $database->list();$database = new Database(
'host',
'primary_key'
);
$response = $database->create("DBNAME");