package Default

 Methods

__toString()

__toString() : string

Returns

string

getAnnotations()

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

Parameters

$annotationManager

\Zend\Code\Annotation\AnnotationManager

Returns

\Zend\Code\Scanner\AnnotationScanner

Get method body

getBody() : string

Returns

string

Get method contents

getContents(boolean $includeDocBlock = true) : string

Parameters

$includeDocBlock

boolean

Returns

string

Get reflection of declaring class

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

Returns

\Zend\Code\Reflection\ClassReflection

Retrieve method DocBlock reflection

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

Returns

\Zend\Code\Reflection\DocBlockReflectionfalse

Get all method parameter reflection objects

getParameters() : array<mixed,\Zend\Code\Reflection\ParameterReflection>

Returns

array<mixed,\Zend\Code\Reflection\ParameterReflection>

Get method prototype

getPrototype($format = \Zend\Code\Reflection\MethodReflection::PROTOTYPE_AS_ARRAY) : array

Parameters

$format

Returns

array

Get start line (position) of method

getStartLine(boolean $includeDocComment = false) : integer

Parameters

$includeDocComment

boolean

Returns

integer

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

\Zend\Code\Scanner\CachingFileScanner

Tokenize method string and return concatenated body

extractMethodContents(boolean $bodyOnly = false) : string

Parameters

$bodyOnly

boolean

Returns

string

Take current position and find any whitespace

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

Parameters

$haystack

array

$position

integer

Returns

string

Test for ending brace

isEndingBrace(array $haystack, integer $position) : boolean

Parameters

$haystack

array

$position

integer

Returns

boolean

Test to see if current position is valid function or closure. Returns true if it's a function and NOT a closure

isValidFunction(array $haystack, integer $position, string $functionName = null) : boolean

Parameters

$haystack

array

$position

integer

$functionName

string

Returns

boolean

 Properties

 

$annotations

$annotations : \Zend\Code\Scanner\AnnotationScanner

Default

null

 Constants

 

Constant use in @MethodReflection to display prototype as an array

PROTOTYPE_AS_ARRAY = 'prototype_as_array' 
 

Constant use in @MethodReflection to display prototype as a string

PROTOTYPE_AS_STRING = 'prototype_as_string'