Methods

__construct()

__construct() 

inherited_from ReflectionMethod::__construct()

__toString()

__toString() : string

Returns

string

export()

export() 

inherited_from ReflectionMethod::export()

getAnnotations()

getAnnotations(\Zend\Code\Annotation\AnnotationManager $annotationManager) : \Zend\Code\Scanner\AnnotationScanner

Get method body

getBody() : string

Returns

string

getClosure()

getClosure() 

inherited_from ReflectionMethod::getClosure()

getClosureScopeClass()

getClosureScopeClass() 

inherited_from ReflectionFunctionAbstract::getClosureScopeClass()

getClosureThis()

getClosureThis() 

inherited_from ReflectionFunctionAbstract::getClosureThis()

Get method contents

getContents(bool $includeDocBlock) : string

Parameters

$includeDocBlock

bool

Returns

string

Get reflection of declaring class

getDeclaringClass() : \Zend\Code\Reflection\ClassReflection

Retrieve method DocBlock reflection

getDocBlock() : \Zend\Code\Reflection\DocBlockReflection | false

getDocComment()

getDocComment() 

inherited_from ReflectionFunctionAbstract::getDocComment()

getEndLine()

getEndLine() 

inherited_from ReflectionFunctionAbstract::getEndLine()

getExtension()

getExtension() 

inherited_from ReflectionFunctionAbstract::getExtension()

getExtensionName()

getExtensionName() 

inherited_from ReflectionFunctionAbstract::getExtensionName()

getFileName()

getFileName() 

inherited_from ReflectionFunctionAbstract::getFileName()

getModifiers()

getModifiers() 

inherited_from ReflectionMethod::getModifiers()

getName()

getName() 

inherited_from ReflectionFunctionAbstract::getName()

getNamespaceName()

getNamespaceName() 

inherited_from ReflectionFunctionAbstract::getNamespaceName()

getNumberOfParameters()

getNumberOfParameters() 

inherited_from ReflectionFunctionAbstract::getNumberOfParameters()

getNumberOfRequiredParameters()

getNumberOfRequiredParameters() 

inherited_from ReflectionFunctionAbstract::getNumberOfRequiredParameters()

Get all method parameter reflection objects

getParameters() : \Zend\Code\Reflection\ParameterReflection[]

Get method prototype

getPrototype($format) : array

Parameters

$format

Returns

array

getShortName()

getShortName() 

inherited_from ReflectionFunctionAbstract::getShortName()

Get start line (position) of method

getStartLine(bool $includeDocComment) : int

Parameters

$includeDocComment

bool

Returns

int

getStaticVariables()

getStaticVariables() 

inherited_from ReflectionFunctionAbstract::getStaticVariables()

inNamespace()

inNamespace() 

inherited_from ReflectionFunctionAbstract::inNamespace()

invoke()

invoke() 

inherited_from ReflectionMethod::invoke()

invokeArgs()

invokeArgs() 

inherited_from ReflectionMethod::invokeArgs()

isAbstract()

isAbstract() 

inherited_from ReflectionMethod::isAbstract()

isClosure()

isClosure() 

inherited_from ReflectionFunctionAbstract::isClosure()

isConstructor()

isConstructor() 

inherited_from ReflectionMethod::isConstructor()

isDeprecated()

isDeprecated() 

inherited_from ReflectionFunctionAbstract::isDeprecated()

isDestructor()

isDestructor() 

inherited_from ReflectionMethod::isDestructor()

isFinal()

isFinal() 

inherited_from ReflectionMethod::isFinal()

isGenerator()

isGenerator() 

inherited_from ReflectionFunctionAbstract::isGenerator()

isInternal()

isInternal() 

inherited_from ReflectionFunctionAbstract::isInternal()

isPrivate()

isPrivate() 

inherited_from ReflectionMethod::isPrivate()

isProtected()

isProtected() 

inherited_from ReflectionMethod::isProtected()

isPublic()

isPublic() 

inherited_from ReflectionMethod::isPublic()

isStatic()

isStatic() 

inherited_from ReflectionMethod::isStatic()

isUserDefined()

isUserDefined() 

inherited_from ReflectionFunctionAbstract::isUserDefined()

returnsReference()

returnsReference() 

inherited_from ReflectionFunctionAbstract::returnsReference()

setAccessible()

setAccessible() 

inherited_from ReflectionMethod::setAccessible()

toString()

toString() : string

Returns

string

Creates a new FileScanner instance.

createFileScanner(string $filename) : \Zend\Code\Scanner\CachingFileScanner

By having this as a seperate method it allows the method to be overridden if a different FileScanner is needed.

Parameters

$filename

string

Returns

Tokenize method string and return concatenated body

extractMethodContents(bool $bodyOnly) : string

Parameters

$bodyOnly

bool

Returns

string

Take current position and find any whitespace

extractPrefixedWhitespace(array $haystack, int $position) : string

Parameters

$haystack

array

$position

int

Returns

string

Test for ending brace

isEndingBrace(array $haystack, int $position) : bool

Parameters

$haystack

array

$position

int

Returns

bool

Test to see if current position is valid function or closure.

isValidFunction(array $haystack, int $position, string $functionName) : bool

Returns true if it's a function and NOT a closure

Parameters

$haystack

array

$position

int

$functionName

string

Returns

bool

 Properties

 

$annotations

$annotations : \Zend\Code\Scanner\AnnotationScanner

 Constants

 

Constant use in @MethodReflection to display prototype as an array

PROTOTYPE_AS_ARRAY 

 

Constant use in @MethodReflection to display prototype as a string

PROTOTYPE_AS_STRING