Reflection class for a full file.
| author | Mike van Riel |
|---|---|
| license | MIT |
| link | http://phpdoc.org |
__construct(string $file, boolean $validate)
During construction the given file is checked whether it is readable and if the $validate argument is true a PHP Lint action is executed to check whether the there are no parse errors.
By default the Lint check is disable because of the performance hit introduced by this action.
If the validation checks out the file's contents are read; converted to UTF-8 and the has is created from those contents.
stringName of the file.
booleanWhether to check the file using PHP Lint.
\phpDocumentor\Reflection\Exception |
when the filename is incorrect or the file can not be opened |
|---|
addMarker(string $name) : void
stringThe Marker term, i.e. FIXME or TODO.
addParserMarker(\phpDocumentor\Parser\Event\LogEvent $data) : void
afterTraverse(array $nodes)
beforeTraverse(array $nodes)
debug(string $message) : void
| inherited_from | \phpDocumentor\Reflection\ReflectionAbstract::debug() |
|---|
stringThe message to log.
enterNode(\PHPParser_Node $node)
getClasses()
getConstants()
getContents()
getDefaultPackageName()
getDocBlock()
getFilename()
getFunctions()
getHash()
getIncludes()
getInterfaces()
getLineNumber()
getMarkers()
getName()
getNamespace()
getNamespaceAliases()
getParseErrors()
getTraits()
leaveNode(\PHPParser_Node $node)
log(string $message, int $priority) : void
| inherited_from | \phpDocumentor\Reflection\ReflectionAbstract::log() |
|---|
stringThe message to log.
intThe logging priority, the lower, the more important. Ranges from 1 to 7
process()
scanForMarkers() : void
| see | \phpDocumentor\Reflection\getMarkers() |
|---|---|
| todo | this method may incur a performance penalty while the AST also contains the comments. This method should be replaced by a piece of code that interprets the comments in the AST. This has not been done since that may be an extensive refactoring (each PHPParser_Node* contains a 'comments' attribute and must thus recursively be discovered) |
setDefaultPackageName($default_package_name)
setFilename($filename)
setMarkers(array $markers) : void
| see | \phpDocumentor\Reflection\FileReflector::addMarker() |
|---|
string[]A list of marker terms to scan for.
isNodeDocumentable(\PHPParser_Node $node) : bool
The following elements are recognized:
\PHPParser_Node
bool$classes
$constants
$contents
$current_namespace
$default_package_name
$doc_block
$filename
$functions
$hash
$includes
$interfaces
$marker_terms : string[]
$markers : string[]
$namespace_aliases
$parse_markers : string[]
$traits