Nextcloud PHP API (master)

Server
in package

FinalYes

Class allowing to inject services into your application. You should use whenever possible dependency injections instead.

use OCP\Server;

$tagManager = Server::get(ITagManager::class);
Tags
since
25.0.0

Table of Contents

Methods

get()  : T|mixed

Methods

get()

public static get(T>|string $serviceName) : T|mixed
Parameters
$serviceName : T>|string
Tags
template

T

psalm-template

S as class-string<T>|string

psalm-param

S $serviceName

psalm-return

(S is class-string<T> ? T : mixed)

throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface
since
25.0.0
Return values
T|mixed

        
On this page

Search results