final class Writer
Writer that generates documentation in Markdown format and configuration for use with the VitePress static site generator.
| Namespace | BeastBytes\CodPhp\Writer\Markdown\VitePress |
|---|---|
| Inheritance | BeastBytes\CodPhp\Writer\Markdown\VitePress\Writer |
| Implements |
Properties
$outputDir
Base output directory for rendered templates.
| Type | Read/Write | Default |
|---|---|---|
| string | Write |
Declared in BeastBytes\CodPhp\Writer\Writer
$templateDir
Template directory relative to the Writer.
| Type | Read/Write | Default |
|---|---|---|
| string | Write |
Declared in BeastBytes\CodPhp\Writer\Markdown\VitePress\Writer
$templateRenderer
Template renderer
| Type | Read/Write | Default |
|---|---|---|
| BeastBytes\CodPhp\Renderer\TemplateRendererInterface | Write |
Declared in BeastBytes\CodPhp\Writer\Writer
Methods
render()
Render a template and return the result.
| public function render(string $template, array $parameters = []): string | ||
| $template | string | Template to render. |
| $parameters | array | Template parameters. |
| return | string | |
| throws | Throwable | |
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 | ||
| $element | BeastBytes\CodPhp\Element\ObjectElement | Element to render. |
| $parameters | array | Template parameters. |
| return | void | |
| throws | Throwable | |
Declared in BeastBytes\CodPhp\Writer\Writer
writeIndex()
Write the API index file.
| public function writeIndex(array $elements, array $parameters): void | ||
| $elements | array | Namespace elements. |
| $parameters | array | Template parameters. |
| return | void | |
| throws | Throwable | |
Declared in BeastBytes\CodPhp\Writer\Writer
writeOther()
Write other documents.
| public function writeOther(array $elements, array $parameters = []): void | ||
| $elements | array | Namespace elements. |
| $parameters | array | Template parameters. |
| return | void | |
| throws | Throwable | |
Declared in BeastBytes\CodPhp\Writer\Markdown\VitePress\Writer
Generated by CodPhp