interface WriterInterface
An interface for Writer classes.
| Namespace | BeastBytes\CodPhp\Writer |
|---|---|
| Inheritance | BeastBytes\CodPhp\Writer\WriterInterface |
| Implemented by | BeastBytes\CodPhp\Writer\Markdown\VitePress\Writer |
Properties
$outputDir
Output directory.
| Type | Read/Write | Default |
|---|---|---|
| string | Write |
Declared in BeastBytes\CodPhp\Writer\WriterInterface
$templateDir
Template directory.
| Type | Read/Write | Default |
|---|---|---|
| string | Write |
Declared in BeastBytes\CodPhp\Writer\WriterInterface
$templateRenderer
Template Renderer.
| Type | Read/Write | Default |
|---|---|---|
| BeastBytes\CodPhp\Renderer\TemplateRendererInterface | Write |
Declared in BeastBytes\CodPhp\Writer\WriterInterface
Methods
render()
Render a template and return the result.
| abstract public function render(string $template, array $parameters): string | ||
| $template | string | Template to render. |
| $parameters | array | Template parameters. |
| return | string | |
Declared in BeastBytes\CodPhp\Writer\WriterInterface
writeElement()
Render an element and write the result to the output directory.
| abstract 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 | |
Declared in BeastBytes\CodPhp\Writer\WriterInterface
writeIndex()
Render an index page for the elements and write the result to the output directory.
| abstract public function writeIndex(array $elements, array $parameters): void | ||
| $elements | array | Namespace elements |
| $parameters | array | Template parameters |
| return | void | |
Declared in BeastBytes\CodPhp\Writer\WriterInterface
writeOther()
Render other relevant document(s) and/or files if required.
| abstract public function writeOther(array $elements, array $parameters): void | ||
| $elements | array | Namespace elements |
| $parameters | array | Template parameters |
| return | void | |
Declared in BeastBytes\CodPhp\Writer\WriterInterface
Generated by CodPhp