Nextcloud PHP API (master)

IRegistrationContext

The context object passed to IBootstrap::register

Tags
since
20.0.0
see
IBootstrap::register()

Table of Contents

Methods

registerAlternativeLogin()  : void
Register an alternative login option
registerCalendarProvider()  : void
Register a calendar provider
registerCalendarResourceBackend()  : void
Register a resource backend for the DAV server
registerCalendarRoomBackend()  : void
Register a room backend for the DAV server
registerCapability()  : void
registerCrashReporter()  : void
Register an implementation of \OCP\Support\CrashReport\IReporter that will receive unhandled exceptions and throwables
registerDashboardWidget()  : void
Register an implementation of \OCP\Dashboard\IWidget that will handle the implementation of a dashboard widget
registerDeclarativeSettings()  : void
Register an implementation of \OCP\Settings\IDeclarativeSettings that will handle the implementation of declarative settings
registerEventListener()  : void
Register a service listener
registerInitialStateProvider()  : void
Register an initialstate provider
registerMailProvider()  : void
Register a mail provider
registerMiddleware()  : void
registerNotifierService()  : void
Register an INotifier class
registerParameter()  : void
registerPreviewProvider()  : void
Register a preview provider
registerProfileLinkAction()  : void
Register an implementation of \OCP\Profile\ILinkAction that will handle the implementation of a profile link action
registerPublicShareTemplateProvider()  : void
Register an implementation of IPublicShareTemplateProvider.
registerReferenceProvider()  : void
Register a reference provider
registerSearchProvider()  : void
Register a search provider for the unified search
registerSensitiveMethods()  : void
Announce methods of classes that may contain sensitive values, which should be obfuscated before being logged.
registerService()  : void
Register a service
registerServiceAlias()  : void
registerSetupCheck()  : void
Register an implementation of \OCP\SetupCheck\ISetupCheck that will handle the implementation of a setup check
registerSpeechToTextProvider()  : void
Register a custom SpeechToText provider class that can provide transcription of audio through the OCP\SpeechToText APIs
registerTalkBackend()  : void
Register the backend of the Talk app
registerTaskProcessingProvider()  : void
Register an implementation of \OCP\TaskProcessing\IProvider that will handle the implementation of task processing
registerTaskProcessingTaskType()  : void
Register an implementation of \OCP\TaskProcessing\ITaskType that will handle the implementation of a task processing type
registerTeamResourceProvider()  : void
registerTemplateProvider()  : void
Register a custom template provider class that is able to inject custom templates in addition to the user defined ones
registerTextProcessingProvider()  : void
Register a custom text processing provider class that provides a promptable language model through the OCP\TextProcessing APIs
registerTextToImageProvider()  : void
Register a custom text2image provider class that provides the possibility to generate images through the OCP\TextToImage APIs
registerTranslationProvider()  : void
Register a custom translation provider class that can provide translation between languages through the OCP\Translation APIs
registerTwoFactorProvider()  : void
Register a two-factor provider
registerUserMigrator()  : void
Register an implementation of \OCP\UserMigration\IMigrator that will handle the implementation of a migrator
registerWellKnownHandler()  : void
Register a well known protocol handler

Methods

registerAlternativeLogin()

Register an alternative login option

public registerAlternativeLogin(string $class) : void

It is allowed to register more than one option per app.

Parameters
$class : string
Tags
psalm-param

class-string<\OCP\Authentication\IAlternativeLogin> $class

since
20.0.0

registerCalendarProvider()

Register a calendar provider

public registerCalendarProvider(string $class) : void
Parameters
$class : string
Tags
psalm-param

class-string<ICalendarProvider> $class

since
23.0.0

registerCalendarResourceBackend()

Register a resource backend for the DAV server

public registerCalendarResourceBackend(string $class) : void
Parameters
$class : string
Tags
psalm-param

class-string<\OCP\Calendar\Resource\IBackend> $actionClass

since
24.0.0

registerCalendarRoomBackend()

Register a room backend for the DAV server

public registerCalendarRoomBackend(string $class) : void
Parameters
$class : string
Tags
psalm-param

class-string<\OCP\Calendar\Room\IBackend> $actionClass

since
24.0.0

registerCapability()

public registerCapability(string $capability) : void
Parameters
$capability : string
Tags
psalm-param

class-string<ICapability> $capability

see
IAppContainer::registerCapability
since
20.0.0

registerCrashReporter()

Register an implementation of \OCP\Support\CrashReport\IReporter that will receive unhandled exceptions and throwables

public registerCrashReporter(string $reporterClass) : void
Parameters
$reporterClass : string
Tags
psalm-param

class-string<\OCP\Support\CrashReport\IReporter> $reporterClass

since
20.0.0

registerDashboardWidget()

Register an implementation of \OCP\Dashboard\IWidget that will handle the implementation of a dashboard widget

public registerDashboardWidget(string $widgetClass) : void
Parameters
$widgetClass : string
Tags
psalm-param

class-string<\OCP\Dashboard\IWidget> $widgetClass

since
20.0.0

registerDeclarativeSettings()

Register an implementation of \OCP\Settings\IDeclarativeSettings that will handle the implementation of declarative settings

public registerDeclarativeSettings(string $declarativeSettingsClass) : void
Parameters
$declarativeSettingsClass : string
Tags
psalm-param

class-string<\OCP\Settings\IDeclarativeSettingsForm> $declarativeSettingsClass

since
29.0.0

registerEventListener()

Register a service listener

public registerEventListener(string $event, string $listener[, int $priority = 0 ]) : void

This is equivalent to calling IEventDispatcher::addServiceListener

Parameters
$event : string

preferably the fully-qualified class name of the Event sub class to listen for

$listener : string

fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container

$priority : int = 0

The higher this value, the earlier an event listener will be triggered in the chain (defaults to 0)

Tags
psalm-template

T of \OCP\EventDispatcher\Event

psalm-param

string|class-string<T> $event preferably the fully-qualified class name of the Event sub class to listen for

psalm-param

class-string<\OCP\EventDispatcher\IEventListener<T>> $listener fully qualified class name that can be built by the DI container

see
IEventDispatcher::addServiceListener()
since
20.0.0

registerInitialStateProvider()

Register an initialstate provider

public registerInitialStateProvider(string $class) : void

It is allowed to register more than one provider per app.

Parameters
$class : string
Tags
psalm-param

class-string<\OCP\AppFramework\Services\InitialStateProvider> $class

since
21.0.0

registerMailProvider()

Register a mail provider

public registerMailProvider(string $class) : void
Parameters
$class : string
Tags
psalm-param

class-string<IMailProvider> $class

since
30.0.0

registerMiddleware()

public registerMiddleware(string $class[, bool $global = false ]) : void
Parameters
$class : string
$global : bool = false

load this middleware also for requests of other apps? Added in Nextcloud 26

Tags
psalm-param

class-string<\OCP\AppFramework\Middleware> $class

see
IAppContainer::registerMiddleWare()
since
20.0.0
since
26.0.0

Added optional argument $global

registerNotifierService()

Register an INotifier class

public registerNotifierService(string $notifierClass) : void
Parameters
$notifierClass : string
Tags
psalm-param

class-string<INotifier> $notifierClass

since
22.0.0

registerPreviewProvider()

Register a preview provider

public registerPreviewProvider(string $previewProviderClass, string $mimeTypeRegex) : void

It is allowed to register more than one provider per app.

Parameters
$previewProviderClass : string
$mimeTypeRegex : string
Tags
psalm-param

class-string<IProviderV2> $previewProviderClass

since
23.0.0

registerProfileLinkAction()

Register an implementation of \OCP\Profile\ILinkAction that will handle the implementation of a profile link action

public registerProfileLinkAction(string $actionClass) : void
Parameters
$actionClass : string
Tags
psalm-param

class-string<\OCP\Profile\ILinkAction> $actionClass

since
23.0.0

registerPublicShareTemplateProvider()

Register an implementation of IPublicShareTemplateProvider.

public registerPublicShareTemplateProvider(string $class) : void
Parameters
$class : string
Tags
psalm-param

class-string<\OCP\Share\IPublicShareTemplateProvider> $class

since
26.0.0

registerReferenceProvider()

Register a reference provider

public registerReferenceProvider(string $class) : void
Parameters
$class : string
Tags
psalm-param

class-string<IReferenceProvider> $class

since
25.0.0

registerSearchProvider()

Register a search provider for the unified search

public registerSearchProvider(string $class) : void

It is allowed to register more than one provider per app as the search results can go into distinct sections, e.g. "Files" and "Files shared with you" in the Files app.

Parameters
$class : string
Tags
psalm-param

class-string<\OCP\Search\IProvider> $class

since
20.0.0

registerSensitiveMethods()

Announce methods of classes that may contain sensitive values, which should be obfuscated before being logged.

public registerSensitiveMethods(string $class, array<string|int, string> $methods) : void
Parameters
$class : string
$methods : array<string|int, string>
Tags
since
25.0.0

registerService()

Register a service

public registerService(string $name, callable $factory[, bool $shared = true ]) : void
Parameters
$name : string
$factory : callable
$shared : bool = true

If set to true the factory result will be cached otherwise every query will call the factory again

Tags
psalm-param

callable(\Psr\Container\ContainerInterface): mixed $factory

see
IContainer::registerService()
since
20.0.0

registerServiceAlias()

public registerServiceAlias(string $alias, string $target) : void
Parameters
$alias : string
$target : string
Tags
psalm-param

string|class-string $alias

psalm-param

string|class-string $target

see
IContainer::registerAlias()
since
20.0.0

registerSetupCheck()

Register an implementation of \OCP\SetupCheck\ISetupCheck that will handle the implementation of a setup check

public registerSetupCheck(ISetupCheck> $setupCheckClass) : void
Parameters
$setupCheckClass : ISetupCheck>
Tags
since
28.0.0

registerSpeechToTextProvider()

Register a custom SpeechToText provider class that can provide transcription of audio through the OCP\SpeechToText APIs

public registerSpeechToTextProvider(string $providerClass) : void
Parameters
$providerClass : string
Tags
psalm-param

class-string<ISpeechToTextProvider> $providerClass

since
27.0.0

registerTalkBackend()

Register the backend of the Talk app

public registerTalkBackend(string $backend) : void

This service must only be used by the Talk app

Parameters
$backend : string
Tags
since
24.0.0

registerTaskProcessingProvider()

Register an implementation of \OCP\TaskProcessing\IProvider that will handle the implementation of task processing

public registerTaskProcessingProvider(string $taskProcessingProviderClass) : void
Parameters
$taskProcessingProviderClass : string
Tags
psalm-param

class-string<\OCP\TaskProcessing\IProvider> $taskProcessingProviderClass

since
30.0.0

registerTaskProcessingTaskType()

Register an implementation of \OCP\TaskProcessing\ITaskType that will handle the implementation of a task processing type

public registerTaskProcessingTaskType(string $taskProcessingTaskTypeClass) : void
Parameters
$taskProcessingTaskTypeClass : string
Tags
psalm-param

class-string<\OCP\TaskProcessing\ITaskType> $taskProcessingTaskTypeClass

since
30.0.0

registerTeamResourceProvider()

public registerTeamResourceProvider(string $class) : void
Parameters
$class : string
Tags
psalm-param

class-string<\OCP\Calendar\Room\IBackend> $actionClass

since
29.0.0

registerTemplateProvider()

Register a custom template provider class that is able to inject custom templates in addition to the user defined ones

public registerTemplateProvider(string $providerClass) : void
Parameters
$providerClass : string
Tags
psalm-param

class-string<ICustomTemplateProvider> $providerClass

since
21.0.0

registerTextProcessingProvider()

Register a custom text processing provider class that provides a promptable language model through the OCP\TextProcessing APIs

public registerTextProcessingProvider(string $providerClass) : void
Parameters
$providerClass : string
Tags
psalm-param

class-string<ITextProcessingProvider> $providerClass

since
27.1.0

registerTextToImageProvider()

Register a custom text2image provider class that provides the possibility to generate images through the OCP\TextToImage APIs

public registerTextToImageProvider(string $providerClass) : void
Parameters
$providerClass : string
Tags
psalm-param

class-string<ITextToImageProvider> $providerClass

since
28.0.0

registerTranslationProvider()

Register a custom translation provider class that can provide translation between languages through the OCP\Translation APIs

public registerTranslationProvider(string $providerClass) : void
Parameters
$providerClass : string
Tags
psalm-param

class-string<ITranslationProvider> $providerClass

since
21.0.0

registerTwoFactorProvider()

Register a two-factor provider

public registerTwoFactorProvider(string $twoFactorProviderClass) : void
Parameters
$twoFactorProviderClass : string
Tags
psalm-param

class-string<IProvider> $twoFactorProviderClass

since
22.0.0

registerUserMigrator()

Register an implementation of \OCP\UserMigration\IMigrator that will handle the implementation of a migrator

public registerUserMigrator(string $migratorClass) : void
Parameters
$migratorClass : string
Tags
psalm-param

class-string<\OCP\UserMigration\IMigrator> $migratorClass

since
24.0.0

registerWellKnownHandler()

Register a well known protocol handler

public registerWellKnownHandler(string $class) : void

It is allowed to register more than one handler per app.

Parameters
$class : string
Tags
psalm-param

class-string<\OCP\Http\WellKnown\IHandler> $class

since
21.0.0

        
On this page

Search results