diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-07-08 19:38:26 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-07-09 12:21:06 +0200 |
commit | 725872c23a82a31026504e052cfff83bc4d6cceb (patch) | |
tree | 27db8a15169d77039a6724109188fae0ca263d9d /lib/public/Support | |
parent | 8f4d5334f4c392a5571c8f96292ae80fa9bbc177 (diff) | |
download | nextcloud-server-725872c23a82a31026504e052cfff83bc4d6cceb.tar.gz nextcloud-server-725872c23a82a31026504e052cfff83bc4d6cceb.zip |
Make the subscription registry lazy
This will allow to do lazy registration here which should allow for
loading less (or at least only when needed!).
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public/Support')
-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 |