\OCP\AppFramework\UtilityIControllerMethodReflector

Interface ControllerMethodReflector

Reads and parses annotations from doc comments

Summary

Methods
Constants
reflect()
getType()
getParameters()
hasAnnotation()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

reflect()

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

Parameters

object $object

an object or classname

string $method

the method which we want to inspect

getType()

getType(string  $parameter) : string|null

Inspects the PHPDoc parameters for types

Parameters

string $parameter

the parameter whose type comments should be parsed

Returns

string|null —

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

getParameters()

getParameters() : array

Returns

array —

the arguments of the method with key => default value

hasAnnotation()

hasAnnotation(string  $name) : boolean

Check if a method contains an annotation

Parameters

string $name

the name of the annotation

Returns

boolean —

true if the annotation is found