@@ -40,143 +40,143 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | interface IRegistrationContext { |
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @param string $capability |
|
| 45 | - * @see IAppContainer::registerCapability |
|
| 46 | - * |
|
| 47 | - * @since 20.0.0 |
|
| 48 | - */ |
|
| 49 | - public function registerCapability(string $capability): void; |
|
| 43 | + /** |
|
| 44 | + * @param string $capability |
|
| 45 | + * @see IAppContainer::registerCapability |
|
| 46 | + * |
|
| 47 | + * @since 20.0.0 |
|
| 48 | + */ |
|
| 49 | + public function registerCapability(string $capability): void; |
|
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * Register an implementation of \OCP\Support\CrashReport\IReporter that |
|
| 53 | - * will receive unhandled exceptions and throwables |
|
| 54 | - * |
|
| 55 | - * @param string $reporterClass |
|
| 56 | - * @psalm-param class-string<\OCP\Support\CrashReport\IReporter> $reporterClass |
|
| 57 | - * @return void |
|
| 58 | - * @since 20.0.0 |
|
| 59 | - */ |
|
| 60 | - public function registerCrashReporter(string $reporterClass): void; |
|
| 51 | + /** |
|
| 52 | + * Register an implementation of \OCP\Support\CrashReport\IReporter that |
|
| 53 | + * will receive unhandled exceptions and throwables |
|
| 54 | + * |
|
| 55 | + * @param string $reporterClass |
|
| 56 | + * @psalm-param class-string<\OCP\Support\CrashReport\IReporter> $reporterClass |
|
| 57 | + * @return void |
|
| 58 | + * @since 20.0.0 |
|
| 59 | + */ |
|
| 60 | + public function registerCrashReporter(string $reporterClass): void; |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * Register an implementation of \OCP\Dashboard\IWidget that |
|
| 64 | - * will handle the implementation of a dashboard widget |
|
| 65 | - * |
|
| 66 | - * @param string $widgetClass |
|
| 67 | - * @psalm-param class-string<\OCP\Dashboard\IWidget> $widgetClass |
|
| 68 | - * @return void |
|
| 69 | - * @since 20.0.0 |
|
| 70 | - */ |
|
| 71 | - public function registerDashboardWidget(string $widgetClass): void; |
|
| 72 | - /** |
|
| 73 | - * Register a service |
|
| 74 | - * |
|
| 75 | - * @param string $name |
|
| 76 | - * @param callable $factory |
|
| 77 | - * @psalm-param callable(\Psr\Container\ContainerInterface): mixed $factory |
|
| 78 | - * @param bool $shared |
|
| 79 | - * |
|
| 80 | - * @return void |
|
| 81 | - * @see IContainer::registerService() |
|
| 82 | - * |
|
| 83 | - * @since 20.0.0 |
|
| 84 | - */ |
|
| 85 | - public function registerService(string $name, callable $factory, bool $shared = true): void; |
|
| 62 | + /** |
|
| 63 | + * Register an implementation of \OCP\Dashboard\IWidget that |
|
| 64 | + * will handle the implementation of a dashboard widget |
|
| 65 | + * |
|
| 66 | + * @param string $widgetClass |
|
| 67 | + * @psalm-param class-string<\OCP\Dashboard\IWidget> $widgetClass |
|
| 68 | + * @return void |
|
| 69 | + * @since 20.0.0 |
|
| 70 | + */ |
|
| 71 | + public function registerDashboardWidget(string $widgetClass): void; |
|
| 72 | + /** |
|
| 73 | + * Register a service |
|
| 74 | + * |
|
| 75 | + * @param string $name |
|
| 76 | + * @param callable $factory |
|
| 77 | + * @psalm-param callable(\Psr\Container\ContainerInterface): mixed $factory |
|
| 78 | + * @param bool $shared |
|
| 79 | + * |
|
| 80 | + * @return void |
|
| 81 | + * @see IContainer::registerService() |
|
| 82 | + * |
|
| 83 | + * @since 20.0.0 |
|
| 84 | + */ |
|
| 85 | + public function registerService(string $name, callable $factory, bool $shared = true): void; |
|
| 86 | 86 | |
| 87 | - /** |
|
| 88 | - * @param string $alias |
|
| 89 | - * @psalm-param string|class-string $alias |
|
| 90 | - * @param string $target |
|
| 91 | - * @psalm-param string|class-string $target |
|
| 92 | - * |
|
| 93 | - * @return void |
|
| 94 | - * @see IContainer::registerAlias() |
|
| 95 | - * |
|
| 96 | - * @since 20.0.0 |
|
| 97 | - */ |
|
| 98 | - public function registerServiceAlias(string $alias, string $target): void; |
|
| 87 | + /** |
|
| 88 | + * @param string $alias |
|
| 89 | + * @psalm-param string|class-string $alias |
|
| 90 | + * @param string $target |
|
| 91 | + * @psalm-param string|class-string $target |
|
| 92 | + * |
|
| 93 | + * @return void |
|
| 94 | + * @see IContainer::registerAlias() |
|
| 95 | + * |
|
| 96 | + * @since 20.0.0 |
|
| 97 | + */ |
|
| 98 | + public function registerServiceAlias(string $alias, string $target): void; |
|
| 99 | 99 | |
| 100 | - /** |
|
| 101 | - * @param string $name |
|
| 102 | - * @param mixed $value |
|
| 103 | - * |
|
| 104 | - * @return void |
|
| 105 | - * @see IContainer::registerParameter() |
|
| 106 | - * |
|
| 107 | - * @since 20.0.0 |
|
| 108 | - */ |
|
| 109 | - public function registerParameter(string $name, $value): void; |
|
| 100 | + /** |
|
| 101 | + * @param string $name |
|
| 102 | + * @param mixed $value |
|
| 103 | + * |
|
| 104 | + * @return void |
|
| 105 | + * @see IContainer::registerParameter() |
|
| 106 | + * |
|
| 107 | + * @since 20.0.0 |
|
| 108 | + */ |
|
| 109 | + public function registerParameter(string $name, $value): void; |
|
| 110 | 110 | |
| 111 | - /** |
|
| 112 | - * Register a service listener |
|
| 113 | - * |
|
| 114 | - * This is equivalent to calling IEventDispatcher::addServiceListener |
|
| 115 | - * |
|
| 116 | - * @param string $event preferably the fully-qualified class name of the Event sub class to listen for |
|
| 117 | - * @psalm-param string|class-string<\OCP\EventDispatcher\Event> $event preferably the fully-qualified class name of the Event sub class to listen for |
|
| 118 | - * @param string $listener fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container |
|
| 119 | - * @psalm-param class-string<\OCP\EventDispatcher\IEventListener> $listener fully qualified class name that can be built by the DI container |
|
| 120 | - * @param int $priority |
|
| 121 | - * |
|
| 122 | - * @see IEventDispatcher::addServiceListener() |
|
| 123 | - * |
|
| 124 | - * @since 20.0.0 |
|
| 125 | - */ |
|
| 126 | - public function registerEventListener(string $event, string $listener, int $priority = 0): void; |
|
| 111 | + /** |
|
| 112 | + * Register a service listener |
|
| 113 | + * |
|
| 114 | + * This is equivalent to calling IEventDispatcher::addServiceListener |
|
| 115 | + * |
|
| 116 | + * @param string $event preferably the fully-qualified class name of the Event sub class to listen for |
|
| 117 | + * @psalm-param string|class-string<\OCP\EventDispatcher\Event> $event preferably the fully-qualified class name of the Event sub class to listen for |
|
| 118 | + * @param string $listener fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container |
|
| 119 | + * @psalm-param class-string<\OCP\EventDispatcher\IEventListener> $listener fully qualified class name that can be built by the DI container |
|
| 120 | + * @param int $priority |
|
| 121 | + * |
|
| 122 | + * @see IEventDispatcher::addServiceListener() |
|
| 123 | + * |
|
| 124 | + * @since 20.0.0 |
|
| 125 | + */ |
|
| 126 | + public function registerEventListener(string $event, string $listener, int $priority = 0): void; |
|
| 127 | 127 | |
| 128 | - /** |
|
| 129 | - * @param string $class |
|
| 130 | - * @psalm-param class-string<\OCP\AppFramework\Middleware> $class |
|
| 131 | - * |
|
| 132 | - * @return void |
|
| 133 | - * @see IAppContainer::registerMiddleWare() |
|
| 134 | - * |
|
| 135 | - * @since 20.0.0 |
|
| 136 | - */ |
|
| 137 | - public function registerMiddleware(string $class): void; |
|
| 128 | + /** |
|
| 129 | + * @param string $class |
|
| 130 | + * @psalm-param class-string<\OCP\AppFramework\Middleware> $class |
|
| 131 | + * |
|
| 132 | + * @return void |
|
| 133 | + * @see IAppContainer::registerMiddleWare() |
|
| 134 | + * |
|
| 135 | + * @since 20.0.0 |
|
| 136 | + */ |
|
| 137 | + public function registerMiddleware(string $class): void; |
|
| 138 | 138 | |
| 139 | - /** |
|
| 140 | - * Register a search provider for the unified search |
|
| 141 | - * |
|
| 142 | - * It is allowed to register more than one provider per app as the search |
|
| 143 | - * results can go into distinct sections, e.g. "Files" and "Files shared |
|
| 144 | - * with you" in the Files app. |
|
| 145 | - * |
|
| 146 | - * @param string $class |
|
| 147 | - * @psalm-param class-string<\OCP\Search\IProvider> $class |
|
| 148 | - * |
|
| 149 | - * @return void |
|
| 150 | - * |
|
| 151 | - * @since 20.0.0 |
|
| 152 | - */ |
|
| 153 | - public function registerSearchProvider(string $class): void; |
|
| 139 | + /** |
|
| 140 | + * Register a search provider for the unified search |
|
| 141 | + * |
|
| 142 | + * It is allowed to register more than one provider per app as the search |
|
| 143 | + * results can go into distinct sections, e.g. "Files" and "Files shared |
|
| 144 | + * with you" in the Files app. |
|
| 145 | + * |
|
| 146 | + * @param string $class |
|
| 147 | + * @psalm-param class-string<\OCP\Search\IProvider> $class |
|
| 148 | + * |
|
| 149 | + * @return void |
|
| 150 | + * |
|
| 151 | + * @since 20.0.0 |
|
| 152 | + */ |
|
| 153 | + public function registerSearchProvider(string $class): void; |
|
| 154 | 154 | |
| 155 | - /** |
|
| 156 | - * Register an alternative login option |
|
| 157 | - * |
|
| 158 | - * It is allowed to register more than one option per app. |
|
| 159 | - * |
|
| 160 | - * @param string $class |
|
| 161 | - * @psalm-param class-string<\OCP\Authentication\IAlternativeLogin> $class |
|
| 162 | - * |
|
| 163 | - * @return void |
|
| 164 | - * |
|
| 165 | - * @since 20.0.0 |
|
| 166 | - */ |
|
| 167 | - public function registerAlternativeLogin(string $class): void; |
|
| 155 | + /** |
|
| 156 | + * Register an alternative login option |
|
| 157 | + * |
|
| 158 | + * It is allowed to register more than one option per app. |
|
| 159 | + * |
|
| 160 | + * @param string $class |
|
| 161 | + * @psalm-param class-string<\OCP\Authentication\IAlternativeLogin> $class |
|
| 162 | + * |
|
| 163 | + * @return void |
|
| 164 | + * |
|
| 165 | + * @since 20.0.0 |
|
| 166 | + */ |
|
| 167 | + public function registerAlternativeLogin(string $class): void; |
|
| 168 | 168 | |
| 169 | - /** |
|
| 170 | - * Register an initialstate provider |
|
| 171 | - * |
|
| 172 | - * It is allowed to register more than one provider per app. |
|
| 173 | - * |
|
| 174 | - * @param string $class |
|
| 175 | - * @psalm-param class-string<\OCP\AppFramework\Services\InitialStateProvider> $class |
|
| 176 | - * |
|
| 177 | - * @return void |
|
| 178 | - * |
|
| 179 | - * @since 21.0.0 |
|
| 180 | - */ |
|
| 181 | - public function registerInitialStateProvider(string $class): void; |
|
| 169 | + /** |
|
| 170 | + * Register an initialstate provider |
|
| 171 | + * |
|
| 172 | + * It is allowed to register more than one provider per app. |
|
| 173 | + * |
|
| 174 | + * @param string $class |
|
| 175 | + * @psalm-param class-string<\OCP\AppFramework\Services\InitialStateProvider> $class |
|
| 176 | + * |
|
| 177 | + * @return void |
|
| 178 | + * |
|
| 179 | + * @since 21.0.0 |
|
| 180 | + */ |
|
| 181 | + public function registerInitialStateProvider(string $class): void; |
|
| 182 | 182 | } |