Nextcloud PHP API (master)

IControllerMethodReflector

Interface ControllerMethodReflector

Reads and parses annotations from doc comments

Tags
since
8.0.0
deprecated
22.0.0

will be obsolete with native attributes in PHP8

see
https://help.nextcloud.com/t/how-should-we-use-php8-attributes/104278

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
reflect()  : void

Methods

getParameters()

public getParameters() : array<string|int, mixed>
Tags
since
8.0.0
deprecated
22.0.0

this method is only used internally

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
Parameters
$parameter : string

the parameter whose type comments should be parsed

Tags
since
8.0.0
deprecated
22.0.0

this method is only used internally

Return values
string|null

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

reflect()

public reflect(object $object, string $method) : void
Parameters
$object : object

an object or classname

$method : string

the method which we want to inspect

Tags
since
8.0.0
deprecated
17.0.0

Reflect should not be called multiple times and only be used internally. This will be removed in Nextcloud 18


        
On this page

Search results