uhupi/php-oop-html-tag-element

1.0.4 2018-12-30 00:24 UTC

This package is not auto-updated.

Last update: 2025-08-23 00:11:05 UTC


README

Simple class to create Html Tags/Elements.

Create frontend even if you are backend Dev.

Is PHP really only Back-End now?

Bringing more redering to the client-side can sink your performance also loose pagespeed in your FMP and FCP. This is a usefull helper for all PHP Front-End and Back-End developers out there trying to bring their PHP code back to the Front again. It uses the basics of an OOP Programming in PHP to make your HTML layout managable, heritable and independent. (Componentwise or Snippet if you may)

Features

  • Manage all your Elements over namespaces, from simple HTML-Elements to complex constructions, call them and render them with a simple new class instance.
  • Do not break your PHP code and to embed inbeetween Html or JS. Create small snippets and print from one variable.
  • Manage globally you entire application using heritance, designing a layout that responses to any change.
  • Also if your apllication already runs on PHP you may have lots of resources (like Routing, locale, Translations...) that will not be available in the front and it gets very complicated to get them into an Javascript or frameworks like React.js or Vue.js.
  • Creating small components in PHP to be parsed by Javascript or any JS Framework allows to use you full PHP Potencial it will possible to write frontend code in PHP and use it on the clientside. More to that cooming soon...
  • Gut clean possiblity for Meaningful-Names and file documentation the way we all know it in PHP. In Beetween Modeling and

Requirements

PHP 7

Installation

  • PHP WebApp: Download and Copy Element.php to your project depending on your namespacing include the file into a namespaced file and create a class extending it.
  • WordPress: Include file to your Theme or any Plugin (Plugin and Explanation coming soon...)

License

PHP-OOP-HTML-Tag-Element is licensed under the MIT License.