summaryrefslogtreecommitdiffstats
path: root/src/Service/DbService.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Service/DbService.php')
-rw-r--r--src/Service/DbService.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Service/DbService.php b/src/Service/DbService.php
index 8c9e948..188bbf6 100644
--- a/src/Service/DbService.php
+++ b/src/Service/DbService.php
@@ -12,6 +12,7 @@ namespace Aegir\Provision\Service;
use Aegir\Provision\Context\SiteContext;
use Aegir\Provision\Service;
+use Aegir\Provision\ServiceInterface;
use Aegir\Provision\ServiceSubscription;
use Symfony\Component\Console\Output\OutputInterface;
@@ -20,7 +21,7 @@ use Symfony\Component\Console\Output\OutputInterface;
*
* @package Aegir\Provision\Service
*/
-class DbService extends Service
+class DbService extends Service implements ServiceInterface
{
const SERVICE = 'db';
@@ -89,7 +90,7 @@ class DbService extends Service
/**
* React to the `provision verify` command on Server contexts
*/
- function verify() {
+ function verifyServer() {
$this->creds = array_map('urldecode', parse_url($this->properties['master_db']));
if (!isset($this->creds['port'])) {
@@ -135,11 +136,11 @@ class DbService extends Service
/**
* React to the `provision verify` command on subscriber contexts (sites and platforms)
*/
- function verifySubscription(ServiceSubscription $serviceSubscription) {
- $this->subscription = $serviceSubscription;
+ function verifySite() {
+ $this->subscription = $this->getContext()->getSubscription($this->type);
// Check for database
- $this->create_site_database($serviceSubscription->context);
+ $this->create_site_database($this->getContext());
$this->creds_root = array_map('urldecode', parse_url($this->properties['master_db']));
@@ -169,6 +170,10 @@ class DbService extends Service
}
}
+ public function verifyPlatform() {
+
+ }
+
/**
* React to `provision verify` command when run on a subscriber, to verify the service's provider.
*