Zend Framework  3.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FileReflection Class Reference

Public Member Functions

 __construct ($filename, $includeIfNotAlreadyIncluded=false)
 
 getFileName ()
 Return the file name of the reflected file.
 
 getStartLine ()
 Get the start line - Always 1, staying consistent with the Reflection API.
 
 getEndLine ()
 Get the end line / number of lines.
 
 getDocComment ()
 
 getDocBlock ()
 
 getNamespaces ()
 
 getNamespace ()
 
 getUses ()
 
 getClasses ()
 Return the reflection classes of the classes found inside this file.
 
 getFunctions ()
 Return the reflection functions of the functions found inside this file.
 
 getClass ($name=null)
 Retrieve the reflection class of a given class found in this file.
 
 getContents ()
 Return the full contents of file.
 
 toString ()
 
 __toString ()
 Serialize to string.
 

Static Public Member Functions

static export ()
 Required by the Reflector interface.
 

Protected Member Functions

 reflect ()
 This method does the work of "reflecting" the file.
 
 checkFileDocBlock ($tokens)
 Validate / check a file level DocBlock.
 

Protected Attributes

 $filePath = null
 
 $docComment = null
 
 $startLine = 1
 
 $endLine = null
 
 $namespaces = []
 
 $uses = []
 
 $requiredFiles = []
 
 $classes = []
 
 $functions = []
 
 $contents = null
 

Constructor & Destructor Documentation

__construct (   $filename,
  $includeIfNotAlreadyIncluded = false 
)
Parameters
string$filename
bool$includeIfNotAlreadyIncluded
Exceptions
Exception\InvalidArgumentExceptionIf file does not exists
Exception\RuntimeExceptionIf file exists but is not included or required

Member Function Documentation

__toString ( )

Serialize to string.

Required by the Reflector interface

Todo:
What should this serialization look like?
Returns
string
checkFileDocBlock (   $tokens)
protected

Validate / check a file level DocBlock.

Parameters
array$tokensArray of tokenizer tokens
Returns
void
static export ( )
static

Required by the Reflector interface.

Todo:
What should this do?
Returns
null
getClass (   $name = null)

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

Parameters
null | string$name
Returns
ClassReflection
Exceptions
Exception\InvalidArgumentExceptionfor invalid class name or invalid reflection class
getClasses ( )

Return the reflection classes of the classes found inside this file.

Returns
ClassReflection[]
getContents ( )

Return the full contents of file.

Returns
string
getDocBlock ( )
getDocComment ( )
Returns
string
getEndLine ( )

Get the end line / number of lines.

Returns
int
getFileName ( )

Return the file name of the reflected file.

Returns
string
getFunctions ( )

Return the reflection functions of the functions found inside this file.

Returns
FunctionReflection[]
getNamespace ( )
Returns
string
getNamespaces ( )
Returns
string[]
getStartLine ( )

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

Returns
int
getUses ( )
Returns
array
reflect ( )
protected

This method does the work of "reflecting" the file.

Uses Zend to gather file information

Returns
void
toString ( )
Returns
string

Implements ReflectionInterface.

Member Data Documentation

$classes = []
protected
$contents = null
protected
$docComment = null
protected
$endLine = null
protected
$filePath = null
protected
$functions = []
protected
$namespaces = []
protected
$requiredFiles = []
protected
$startLine = 1
protected
$uses = []
protected