Skip to content

final class Writer

Source Code

Writer that generates documentation in Markdown format and configuration for use with the VitePress static site generator.

NamespaceBeastBytes\CodPhp\Writer\Markdown\VitePress
Inheritance

BeastBytes\CodPhp\Writer\Markdown\VitePress\Writer
BeastBytes\CodPhp\Writer\Markdown\Writer
BeastBytes\CodPhp\Writer\Writer

Implements

BeastBytes\CodPhp\Writer\WriterInterface

Properties

$outputDir

Base output directory for rendered templates.

TypeRead/WriteDefault
stringWrite

Declared in BeastBytes\CodPhp\Writer\Writer


$templateDir

Template directory relative to the Writer.

TypeRead/WriteDefault
stringWrite

Declared in BeastBytes\CodPhp\Writer\Markdown\VitePress\Writer


$templateRenderer

Template renderer

TypeRead/WriteDefault
BeastBytes\CodPhp\Renderer\TemplateRendererInterfaceWrite

Declared in BeastBytes\CodPhp\Writer\Writer


Methods

render()

Render a template and return the result.

public function render(string $template, array $parameters = []): string
$templatestringTemplate to render.
$parametersarrayTemplate parameters.
returnstring
throwsThrowable

Declared in BeastBytes\CodPhp\Writer\Writer


writeElement()

Render an element and write the result to the output directory.

public function writeElement(BeastBytes\CodPhp\Element\ObjectElement $element, array $parameters): void
$elementBeastBytes\CodPhp\Element\ObjectElementElement to render.
$parametersarrayTemplate parameters.
returnvoid
throwsThrowable

Declared in BeastBytes\CodPhp\Writer\Writer


writeIndex()

Write the API index file.

public function writeIndex(array $elements, array $parameters): void
$elementsarrayNamespace elements.
$parametersarrayTemplate parameters.
returnvoid
throwsThrowable

Declared in BeastBytes\CodPhp\Writer\Writer


writeOther()

Write other documents.

public function writeOther(array $elements, array $parameters = []): void
$elementsarrayNamespace elements.
$parametersarrayTemplate parameters.
returnvoid
throwsThrowable

Declared in BeastBytes\CodPhp\Writer\Markdown\VitePress\Writer


Generated by CodPhp