Documentation

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
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

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>|string

getStartLine()

Get start line (position) of function

public getStartLine([bool $includeDocComment = false ]) : int
Parameters
$includeDocComment : bool = false
Return values
int

        
On this page

Search results