FunctionReflection
extends ReflectionFunction
in package
implements
ReflectionInterface
Interfaces, Classes, Traits and Enums
Table of Contents
- 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
- __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
string —getBody()
Get method body
public
getBody() : string|false
Return values
string|false —getContents()
Get contents of function
public
getContents([bool $includeDocBlock = true ]) : string
Parameters
- $includeDocBlock : bool = true
Return values
string —getDocBlock()
Get function DocBlock
public
getDocBlock() : DocBlockReflection
Tags
Return values
DocBlockReflection —getParameters()
Get function parameters
public
getParameters() : array<string|int, ParameterReflection>
Return values
array<string|int, ParameterReflection> —getPrototype()
Get method prototype
public
getPrototype([string $format = FunctionReflection::PROTOTYPE_AS_ARRAY ]) : array<string|int, mixed>|string
Parameters
- $format : string = FunctionReflection::PROTOTYPE_AS_ARRAY
Return values
array<string|int, mixed>|string —getReturn()
Get return type tag
public
getReturn() : DocBlockReflection
Tags
Return values
DocBlockReflection —getStartLine()
Get start line (position) of function
public
getStartLine([bool $includeDocComment = false ]) : int
Parameters
- $includeDocComment : bool = false
Return values
int —toString()
public
toString() : string