Methods

__construct()

__construct(string $filename, bool $includeIfNotAlreadyIncluded) 

Parameters

$filename

string

$includeIfNotAlreadyIncluded

bool

Exceptions

\Zend\Code\Reflection\Exception\InvalidArgumentException If file does not exists
\Zend\Code\Reflection\Exception\RuntimeException If file exists but is not included or required

Serialize to string

__toString() : string

Required by the Reflector interface

todo What should this serialization look like?

Returns

string

Required by the Reflector interface.

export() : null

todo What should this do?

Returns

null

Retrieve the reflection class of a given class found in this file

getClass(null | string $name) : \Zend\Code\Reflection\ClassReflection

Parameters

$name

nullstring

Exceptions

\Zend\Code\Reflection\Exception\InvalidArgumentException for invalid class name or invalid reflection class

Returns

Return the reflection classes of the classes found inside this file

getClasses() : \Zend\Code\Reflection\ClassReflection[]

Return the full contents of file

getContents() : string

Returns

string

getDocComment()

getDocComment() : string

Returns

string

Get the end line / number of lines

getEndLine() : int

Returns

int

Return the file name of the reflected file

getFileName() : string

Returns

string

Return the reflection functions of the functions found inside this file

getFunctions() : \Zend\Code\Reflection\FunctionReflection[]

getNamespace()

getNamespace() : string

Returns

string

getNamespaces()

getNamespaces() : string[]

Returns

string[]

Get the start line - Always 1, staying consistent with the Reflection API

getStartLine() : int

Returns

int

getUses()

getUses() : array

Returns

array

toString()

toString() : string

Returns

string

Validate / check a file level DocBlock

checkFileDocBlock(array $tokens) : void

Parameters

$tokens

array

Array of tokenizer tokens

This method does the work of "reflecting" the file

reflect() : void

Uses Zend\Code\Scanner\FileScanner to gather file information

 Properties

   

$contents

$contents : string

 

$docComment

$docComment : string

 

$endLine

$endLine : int

 

$filePath

$filePath : string

 

$functions

$functions : \Zend\Code\Reflection\FunctionReflection[]

 

$namespaces

$namespaces : string[]

 

$requiredFiles

$requiredFiles : string[]

 

$startLine

$startLine : int

 

$uses

$uses : string[]