Documentation

IRegistrationContext
in

The context object passed to IBootstrap::register

Tags
since
20.0.0
see
IBootstrap::register()

Table of Contents

registerAlternativeLogin()  : void
Register an alternative login option
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\IPanel that will handle the implementation of a dashboard panel
registerEventListener()  : void
Register a service listener
registerMiddleware()  : void
registerParameter()  : void
registerSearchProvider()  : void
Register a search provider for the unified search
registerService()  : void
Register a service
registerServiceAlias()  : void

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
since
20.0.0

registerCapability()

public registerCapability(string $capability) : void
Parameters
$capability : string
Tags
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
since
20.0.0

registerDashboardWidget()

Register an implementation of \OCP\Dashboard\IPanel that will handle the implementation of a dashboard panel

public registerDashboardWidget(string $widgetClass) : void
Parameters
$widgetClass : string
Tags
since
20.0.0

registerEventListener()

Register a service listener

public registerEventListener(string $event, string $listener, int $priority) : 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
Tags
see
IEventDispatcher::addServiceListener()
since
20.0.0

registerMiddleware()

public registerMiddleware(string $class) : void
Parameters
$class : string
Tags
see
IAppContainer::registerMiddleWare()
since
20.0.0

registerParameter()

public registerParameter(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Tags
see
IContainer::registerParameter()
since
20.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
since
20.0.0

registerService()

Register a service

public registerService(string $name, callable $factory[, bool $shared = true ]) : void
Parameters
$name : string
$factory : callable
$shared : bool = true
Tags
see
IContainer::registerService()
since
20.0.0

registerServiceAlias()

public registerServiceAlias(string $alias, string $target) : void
Parameters
$alias : string
$target : string
Tags
see
IContainer::registerAlias()
since
20.0.0

Search results