IRegistrationContext

interface OCP\AppFramework\Bootstrap\IRegistrationContext
The context object passed to IBootstrap::register
Source:lib/public/AppFramework/Bootstrap/IRegistrationContext.php#46

Methods

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability($capability)
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#55

Parameters:
  • $capability (string)
See:

\OCP\AppFramework\Bootstrap\IAppContainer::registerCapability

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerCrashReporter($reporterClass)
Register an implementation of \OCP\Support\CrashReport\IReporter that
will receive unhandled exceptions and throwables
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#66

Parameters:
  • $reporterClass (string)
Returns:

void

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerDashboardWidget($widgetClass)
Register an implementation of \OCP\Dashboard\IWidget that
will handle the implementation of a dashboard widget
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#77

Parameters:
  • $widgetClass (string)
Returns:

void

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerService($name, $factory, $shared=true)
Register a service
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#91

Parameters:
  • $name (string)
  • $factory (callable)
  • $shared (bool)
Returns:

void

See:

\OCP\AppFramework\Bootstrap\IContainer::registerService()

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerServiceAlias($alias, $target)
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#104

Parameters:
  • $alias (string)
  • $target (string)
Returns:

void

See:

\OCP\AppFramework\Bootstrap\IContainer::registerAlias()

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerParameter($name, $value)
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#115

Parameters:
  • $name (string)
  • $value (mixed)
Returns:

void

See:

\OCP\AppFramework\Bootstrap\IContainer::registerParameter()

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerEventListener($event, $listener, $priority=0)
Register a service listener
This is equivalent to calling IEventDispatcher::addServiceListener
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#134

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 OCPEventDispatcherIEventListener that can be built by the DI container
  • $priority (int) The higher this value, the earlier an event

listener will be triggered in the chain (defaults to 0)

See:

\OCP\AppFramework\Bootstrap\IEventDispatcher::addServiceListener()

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware($class)
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#145

Parameters:
  • $class (string)
Returns:

void

See:

\OCP\AppFramework\Bootstrap\IAppContainer::registerMiddleWare()

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerSearchProvider($class)
Register a search provider for the unified search
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.
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#161

Parameters:
  • $class (string)
Returns:

void

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerAlternativeLogin($class)
Register an alternative login option
It is allowed to register more than one option per app.
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#175

Parameters:
  • $class (string)
Returns:

void

Since:

20.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerInitialStateProvider($class)
Register an initialstate provider
It is allowed to register more than one provider per app.
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#189

Parameters:
  • $class (string)
Returns:

void

Since:

21.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerWellKnownHandler($class)
Register a well known protocol handler
It is allowed to register more than one handler per app.
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#203

Parameters:
  • $class (string)
Returns:

void

Since:

21.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerTemplateProvider($providerClass)
Register a custom template provider class that is able to inject custom templates
in addition to the user defined ones
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#213

Parameters:
  • $providerClass (string)
Since:

21.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerNotifierService($notifierClass)
Register an INotifier class
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#222

Parameters:
  • $notifierClass (string)
Since:

22.0.0

public OCP\AppFramework\Bootstrap\IRegistrationContext::registerTwoFactorProvider($twoFactorProviderClass)
Register a two-factor provider
Source:

lib/public/AppFramework/Bootstrap/IRegistrationContext.php#231

Parameters:
  • $twoFactorProviderClass (string)
Since:

22.0.0