IAppContainer

interface OCP\AppFramework\IAppContainer
This is a tagging interface for a container that belongs to an app
The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
thus this interface won’t extend it anymore once that was removed. So migrate to the ContainerInterface
only.
Implemented by:OC\AppFramework\DependencyInjection\DIContainer
Source:lib/public/AppFramework/IAppContainer.php#44
Parent:Psr\Container\ContainerInterface
Parent:OCP\IContainer

Methods

public OCP\AppFramework\IAppContainer::getAppName()
used to return the appname of the set application
Source:lib/public/AppFramework/IAppContainer.php#52
Returns:string the name of your application
Since:6.0.0
Deprecated:20.0.0
public OCP\AppFramework\IAppContainer::getServer()
Source:lib/public/AppFramework/IAppContainer.php#59
Returns:\OCP\IServerContainer
Since:6.0.0
Deprecated:20.0.0
public OCP\AppFramework\IAppContainer::registerMiddleWare($middleWare)
Source:

lib/public/AppFramework/IAppContainer.php#67

Parameters:
  • $middleWare (string)
Returns:

bool

Since:

6.0.0

Deprecated:

20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware

public OCP\AppFramework\IAppContainer::registerCapability($serviceName)
Register a capability
Source:

lib/public/AppFramework/IAppContainer.php#76

Parameters:
  • $serviceName (string) e.g. ‘OCAFilesCapabilities’
Since:

8.2.0

Deprecated:

20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability