ParsePagesListener
in package
FinalYes
Parses and compiles standalone pages after the main documentation has been parsed.
Triggered by PostParseProcess, this listener:
- Discovers all source files in the configured pages source directory.
- Parses each file via ParseFileCommand → DocumentNode.
- Promotes each DocumentNode to a PageNode, extracting any PageDestinationNode to override the default output path.
- Wraps each PageNode's body children in a temporary DocumentNode and runs the standard compiler via CompileDocumentsCommand against the shared ProjectNode, so that cross-references inside pages are resolved correctly.
- Stores each compiled PageNode in the PagesRegistry for later rendering by RenderPagesListener.
Table of Contents
Properties
- $commandBus : CommandBus
- $fileCollector : FileCollector
- $logger : LoggerInterface
- $registry : PagesRegistry
- $sourceDirectory : string
Methods
- __construct() : mixed
- __invoke() : void
Properties
$commandBus read-only
private
CommandBus
$commandBus
$fileCollector read-only
private
FileCollector
$fileCollector
$logger read-only
private
LoggerInterface
$logger
$registry read-only
private
PagesRegistry
$registry
$sourceDirectory read-only
private
string
$sourceDirectory
Methods
__construct()
public
__construct(CommandBus $commandBus, FileCollector $fileCollector, PagesRegistry $registry, LoggerInterface $logger, string $sourceDirectory) : mixed
Parameters
- $commandBus : CommandBus
- $fileCollector : FileCollector
- $registry : PagesRegistry
- $logger : LoggerInterface
- $sourceDirectory : string
__invoke()
public
__invoke(PostParseProcess $event) : void
Parameters
- $event : PostParseProcess