Template Development
Templates are responsible for the information and layout shown in the generated documentation and the rendering result in the desired output format.
There are three reasons for developing templates:
- To support a template renderer; for example, Latte templates for a Latte template renderer.
- To change the generated documentation output format.
- To change the information, its layout, etc. rendered.
Nested Templates
Handling nested templates is the responsibility of the template renderer.
WriterInterface specifies the render() method. This renders a template and returns its value as a string and can be used to render partial templates
Documentation Errors
Documentation errors are registered in templates using the ErrorCollection class; call ErrorCollection::addError(), ErrorCollection::addWarning(), or ErrorCollection::addNotice() as appropriate. What is considered an error, warning, or notice is the choice of the template developer.
Attribution
While not a requirement, we would appreciate an attribution link to CodPhp in developed templates.