FunctionReflection
extends ReflectionFunction
in package
implements
ReflectionInterface
Table of Contents
Interfaces
- ReflectionInterface
Constants
- PROTOTYPE_AS_ARRAY = 'prototype_as_array'
- Constant use in @MethodReflection to display prototype as an array
- PROTOTYPE_AS_STRING = 'prototype_as_string'
- Constant use in @MethodReflection to display prototype as a string
Methods
- __toString() : string
- Required due to bug in php
- getBody() : string|false
- Get method body
- getContents() : string
- Get contents of function
- getDocBlock() : DocBlockReflection
- Get function DocBlock
- getParameters() : array<string|int, ParameterReflection>
- Get function parameters
- getPrototype() : array<string|int, mixed>|string
- Get method prototype
- getReturn() : DocBlockReflection
- Get return type tag
- getStartLine() : int
- Get start line (position) of function
- toString() : string
Constants
PROTOTYPE_AS_ARRAY
Constant use in @MethodReflection to display prototype as an array
public
mixed
PROTOTYPE_AS_ARRAY
= 'prototype_as_array'
PROTOTYPE_AS_STRING
Constant use in @MethodReflection to display prototype as a string
public
mixed
PROTOTYPE_AS_STRING
= 'prototype_as_string'
Methods
__toString()
Required due to bug in php
public
__toString() : string
Return values
stringgetBody()
Get method body
public
getBody() : string|false
Return values
string|falsegetContents()
Get contents of function
public
getContents([bool $includeDocBlock = true ]) : string
Parameters
- $includeDocBlock : bool = true
Return values
stringgetDocBlock()
Get function DocBlock
public
getDocBlock() : DocBlockReflection
Tags
Return values
DocBlockReflectiongetParameters()
Get function parameters
public
getParameters() : array<string|int, ParameterReflection>
Return values
array<string|int, ParameterReflection>getPrototype()
Get method prototype
public
getPrototype([string $format = self::PROTOTYPE_AS_ARRAY ]) : array<string|int, mixed>|string
Parameters
- $format : string = self::PROTOTYPE_AS_ARRAY
Return values
array<string|int, mixed>|stringgetReturn()
Get return type tag
public
getReturn() : DocBlockReflection
Tags
Return values
DocBlockReflectiongetStartLine()
Get start line (position) of function
public
getStartLine([bool $includeDocComment = false ]) : int
Parameters
- $includeDocComment : bool = false
Return values
inttoString()
public
toString() : string