File

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

package

Default

Methods

Registers the Parser object to get settings from.

__construct(\phpDocumentor\Parser\Parser $parser) 

Arguments

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

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

Arguments

$filename

string

Response

\phpDocumentor\Reflection\FileReflector|null

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

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

getRelativeFilename(string $filename) : string
Throws
\InvalidArgumentException

if file is not in the project root.

Arguments

$filename

string

The filename to make relative.

Response

string

Dispatches a logging request.

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

Arguments

$message

string

The message to log.

$priority

string

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

$parameters

array<mixed,string>

Writes the errors found in the Descriptor to the log.

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

Arguments

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

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

Arguments

$filename

string

Properties

parser

parser : \phpDocumentor\Parser\Parser