ParseFileHandler
in package
FinalYes
Table of Contents
Properties
- $eventDispatcher : EventDispatcherInterface
- $logger : LoggerInterface
- $parser : Parser
Methods
- __construct() : mixed
- handle() : DocumentNode|null
- buildPathOnFileSystem() : string
- createDocument() : DocumentNode|null
- getFileContents() : string
Properties
$eventDispatcher read-only
private
EventDispatcherInterface
$eventDispatcher
$logger read-only
private
LoggerInterface
$logger
$parser read-only
private
Parser
$parser
Methods
__construct()
public
__construct(LoggerInterface $logger, EventDispatcherInterface $eventDispatcher, Parser $parser) : mixed
Parameters
- $logger : LoggerInterface
- $eventDispatcher : EventDispatcherInterface
- $parser : Parser
handle()
public
handle(ParseFileCommand $command) : DocumentNode|null
Parameters
- $command : ParseFileCommand
Return values
DocumentNode|nullbuildPathOnFileSystem()
private
buildPathOnFileSystem(string $file, string $currentDirectory, string $extension) : string
Parameters
- $file : string
- $currentDirectory : string
- $extension : string
Return values
stringcreateDocument()
private
createDocument(FilesystemInterface $origin, string $documentFolder, string $fileName, string $extension, int $initialHeaderLevel, ProjectNode $projectNode, bool $isRoot) : DocumentNode|null
Parameters
- $origin : FilesystemInterface
- $documentFolder : string
- $fileName : string
- $extension : string
- $initialHeaderLevel : int
- $projectNode : ProjectNode
- $isRoot : bool
Return values
DocumentNode|nullgetFileContents()
private
getFileContents(FilesystemInterface $origin, string $file) : string
Parameters
- $origin : FilesystemInterface
- $file : string