\phpDocumentor\ParserFile

Parses a single file into a FileDescriptor and adds it to the given ProjectBuilder.

Summary

Methods
Properties
Constants
__construct()
parse()
getRelativeFilename()
No public properties found
No constants found
createFileReflector()
logErrorsForDescriptor()
log()
$parser
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(\phpDocumentor\Parser\Parser  $parser) 

Registers the Parser object to get settings from.

Parameters

\phpDocumentor\Parser\Parser $parser

parse()

parse(string  $filename, \phpDocumentor\Descriptor\ProjectDescriptorBuilder  $builder) : void

Parses the file identified by the given filename and passes the resulting FileDescriptor to the ProjectBuilder.

Parameters

string $filename
\phpDocumentor\Descriptor\ProjectDescriptorBuilder $builder

getRelativeFilename()

getRelativeFilename(string  $filename) : string

Returns the filename, relative to the root of the project directory.

Parameters

string $filename

The filename to make relative.

Throws

\InvalidArgumentException

if file is not in the project root.

Returns

string

createFileReflector()

createFileReflector(\phpDocumentor\Descriptor\ProjectDescriptorBuilder  $builder, string  $filename) : \phpDocumentor\Reflection\FileReflector|null

Creates a new FileReflector for the given filename or null if the file contains no modifications.

Parameters

\phpDocumentor\Descriptor\ProjectDescriptorBuilder $builder
string $filename

Returns

\phpDocumentor\Reflection\FileReflector|null —

Returns a new FileReflector or null if no modifications were detected for the given filename.

logErrorsForDescriptor()

logErrorsForDescriptor(\phpDocumentor\Descriptor\FileDescriptor  $fileDescriptor) : void

Writes the errors found in the Descriptor to the log.

Parameters

\phpDocumentor\Descriptor\FileDescriptor $fileDescriptor

log()

log(string  $message, string  $priority = \Psr\Log\LogLevel::INFO, array<mixed,string>  $parameters = array()) : void

Dispatches a logging request.

Parameters

string $message

The message to log.

string $priority

The logging priority as declared in the LogLevel PSR-3 class.

array<mixed,string> $parameters