UUP-WEB-COMPONENT - Web components library for PHP
Tired of writing HTML?
Then this library can help you by providing an OOP approach were you instantiate widget, container or element classes and call render to generate HTML.
One of the goals are also to abstact away CSS-styling. The render transformer uses properties defined on objects to render the web component in prefered style. The library user can define their own render transformer.
The default render transformer is paragon that produces HTML targetting the W3.CSS library from properties defined in component objects:
// // Render widget button: // $button = new Button("Download"); $button->color->back = "red"; $button->render(); // <button class="w3-btn w3-red">Download</button>
Tree structures can be created by addding child components. Call render on top level component and it should render any child component automatic.