diff options
Diffstat (limited to 'lib/public/Support/Subscription/IRegistry.php')
-rw-r--r-- | lib/public/Support/Subscription/IRegistry.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/public/Support/Subscription/IRegistry.php b/lib/public/Support/Subscription/IRegistry.php index ec491c370f1..430ddbcf8d1 100644 --- a/lib/public/Support/Subscription/IRegistry.php +++ b/lib/public/Support/Subscription/IRegistry.php @@ -35,17 +35,29 @@ use OCP\Support\Subscription\Exception\AlreadyRegisteredException; interface IRegistry { /** - * Register a subscription instance. In case it is called multiple times the - * first one is used. + * Register a subscription instance. In case it is called multiple times an + * exception is thrown * * @param ISubscription $subscription * @throws AlreadyRegisteredException * * @since 17.0.0 + * @deprecated 20.0.0 use registerService */ public function register(ISubscription $subscription): void; /** + * Register a subscription handler. The service has to implement the ISubscription interface. + * In case this is called multiple times an exception is thrown. + * + * @param string $subscriptionService + * @throws AlreadyRegisteredException + * + * @since 20.0.0 + */ + public function registerService(string $subscriptionService): void; + + /** * Fetches the list of app IDs that are supported by the subscription * * @since 17.0.0 |