Nextcloud PHP API (master)

IControllerMethodReflector

Interface ControllerMethodReflector

You can inject this interface in your Middleware, and it will be prefilled with information related to the called controller method

Reads and parses annotations from doc comments (deprecated) and PHP attributes

Tags
since
8.0.0

Table of Contents

Methods

getParameters()  : array<string|int, mixed>
getType()  : string|null
Inspects the PHPDoc parameters for types
hasAnnotation()  : bool
Check if a method contains an annotation
hasAnnotationOrAttribute()  : bool

Methods

getParameters()

public getParameters() : array<string|int, mixed>

this method is only used internally

Tags
since
8.0.0
Return values
array<string|int, mixed>

the arguments of the method with key => default value

getType()

Inspects the PHPDoc parameters for types

public getType(string $parameter) : string|null

this method is only used internally

Parameters
$parameter : string

the parameter whose type comments should be parsed

Tags
since
8.0.0
Return values
string|null

type in the type parameters (@param int $something) would return int or null if not existing

hasAnnotationOrAttribute()

public hasAnnotationOrAttribute(string|null $annotationName, T> $attributeClass) : bool
Parameters
$annotationName : string|null
$attributeClass : T>
Tags
template

Check if a method contains an annotation or an attribute. Log a debug line if the annotation is used.

since
34.0.0
Return values
bool

        
On this page

Search results