Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
namespace Mozartify\Subscription;
interface Storage
{
// ...
public function createNewTenant(string $tenantName);
public function addPackage(int $subscriptionId, string $packageType);
}
class MyReadOnlyStorage implements Storage
{
public function createNewTenant(string $tenantName)
{
// TODO: Implement createNewTenant() method.
}
public function addPackage(int $subscriptionId, string $packageType)
{
throw new Exception('Read Only Driver');
}
// ...
}
class UseCaseImpl
{
// ...
public function execute()
{
$this->storage->createNewTenant('name');
$this->storage->addPackage(1, 'demo');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.