IAppContainer
extends
ContainerInterface, IContainer
in
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.
Tags
Table of Contents
Methods
- get() : T : mixed)
- Finds an entry of the container by its identifier and returns it.
- getAppName() : string
- used to return the appname of the set application
- getServer() : ContainerInterface
- registerCapability() : mixed
- Register a capability
- registerMiddleWare() : bool
Methods
get()
Finds an entry of the container by its identifier and returns it.
public
get(T>|string $id) : T : mixed)
Parameters
- $id : T>|string
-
Identifier of the entry to look for.
Tags
Attributes
- #[Override]
Return values
T : mixed) —Entry.
getAppName()
used to return the appname of the set application
public
getAppName() : string
Tags
Return values
string —the name of your application
getServer()
public
getServer() : ContainerInterface
Tags
Return values
ContainerInterfaceregisterCapability()
Register a capability
public
registerCapability(string $serviceName) : mixed
use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability
Parameters
- $serviceName : string
-
e.g. 'OCA\Files\Capabilities'
Tags
registerMiddleWare()
public
registerMiddleWare(string $middleWare) : bool
use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware
Parameters
- $middleWare : string