IControllerMethodReflector

interface OCP\AppFramework\Utility\IControllerMethodReflector
Interface ControllerMethodReflector
Reads and parses annotations from doc comments
Implemented by:OC\AppFramework\Utility\ControllerMethodReflector
Source:lib/public/AppFramework/Utility/IControllerMethodReflector.php#38

Methods

public OCP\AppFramework\Utility\IControllerMethodReflector::reflect($object, $method)
Source:

lib/public/AppFramework/Utility/IControllerMethodReflector.php#47

Parameters:
  • $object (object) an object or classname
  • $method (string) the method which we want to inspect
Returns:

void

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

public OCP\AppFramework\Utility\IControllerMethodReflector::getType($parameter)
Inspects the PHPDoc parameters for types
Source:

lib/public/AppFramework/Utility/IControllerMethodReflector.php#58

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

Since:

8.0.0

public OCP\AppFramework\Utility\IControllerMethodReflector::getParameters()
Source:lib/public/AppFramework/Utility/IControllerMethodReflector.php#64
Returns:array the arguments of the method with key => default value
Since:8.0.0
public OCP\AppFramework\Utility\IControllerMethodReflector::hasAnnotation($name)
Check if a method contains an annotation
Source:

lib/public/AppFramework/Utility/IControllerMethodReflector.php#73

Parameters:
  • $name (string) the name of the annotation
Returns:

bool true if the annotation is found

Since:

8.0.0