Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Reflection_File Class Reference

Public Member Functions

 __construct ($file)
 Constructor.
 
 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 ()
 Return the doc comment.
 
 getDocblock ($reflectionClass= 'Zend_Reflection_Docblock')
 Return the docblock.
 
 getClasses ($reflectionClass= 'Zend_Reflection_Class')
 Return the reflection classes of the classes found inside this file.
 
 getFunctions ($reflectionClass= 'Zend_Reflection_Function')
 Return the reflection functions of the functions found inside this file.
 
 getClass ($name=null, $reflectionClass= 'Zend_Reflection_Class')
 Retrieve the reflection class of a given class found in this file.
 
 getContents ()
 Return the full contents of file.
 
 __toString ()
 Serialize to string.
 

Static Public Member Functions

static findRealpathInIncludePath ($fileName)
 Find realpath of file based on include_path.
 
static export ()
 Export.
 

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
 
 $_requiredFiles = array()
 
 $_classes = array()
 
 $_functions = array()
 
 $_contents = null
 

Constructor & Destructor Documentation

__construct (   $file)

Constructor.

Parameters
string$file
Returns
void

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
_reflect ( )
protected

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

Uses PHP's tokenizer to perform file reflection.

Returns
void
static export ( )
static

Export.

Required by the Reflector interface.

Todo:
What should this do?
Returns
null
static findRealpathInIncludePath (   $fileName)
static

Find realpath of file based on include_path.

Parameters
string$fileName
Returns
string
getClass (   $name = null,
  $reflectionClass = 'Zend_Reflection_Class' 
)

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

Parameters
null | string$name
string$reflectionClassReflection class to use when creating reflection instance
Returns
Zend_Reflection_Class
Exceptions
Zend_Reflection_Exceptionfor invalid class name or invalid reflection class
getClasses (   $reflectionClass = 'Zend_Reflection_Class')

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

Parameters
string$reflectionClassName of reflection class to use for instances
Returns
array Array of Zend_Reflection_Class instances
getContents ( )

Return the full contents of file.

Returns
string
getDocblock (   $reflectionClass = 'Zend_Reflection_Docblock')

Return the docblock.

Parameters
string$reflectionClassReflection class to use
Returns
Zend_Reflection_Docblock
getDocComment ( )

Return the doc comment.

Returns
string
getEndLine ( )

Get the end line / number of lines.

Returns
int
getFileName ( )

Return the file name of the reflected file.

Returns
string
getFunctions (   $reflectionClass = 'Zend_Reflection_Function')

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

Parameters
string$reflectionClassName of reflection class to use for instances
Returns
array Array of Zend_Reflection_Functions
getStartLine ( )

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

Returns
int

Member Data Documentation

$_classes = array()
protected
$_contents = null
protected
$_docComment = null
protected
$_endLine = null
protected
$_filepath = null
protected
$_functions = array()
protected
$_requiredFiles = array()
protected
$_startLine = 1
protected