The Goal of this Package is to create a simple and MVC independent HTML Code Renderer.
The following versions of PHP are supported by this version.
- PHP 5.4
- PHP 5.5
- PHP 5.6
- PHP 7.0
- HHVM
Flex follows the standards defined in the PSR-0, PSR-1, PSR-2 and PSR-4 documents.
Via Composer
{
"require": {
"elnebuloso/flex-code-html": "~1.0"
}
}
- each tag has a render method which returns the html code
- each tag has the magic "__toString" method which renders the html code over the render method
- the setter methods on the tag object are chainable
- you can define the doctype in which the tag should render
- the doctype e.g. decides how to close the tag (self-closing tag, void / non-void tags)
- each tag can have children of TagInterface or String which will be rendered as the tag body (only if tag is not marked as non-void tag)