It's kind of wrapper of html or dom builder based on windwalker-dom and windwalker-html, but inspired by projects rudykocur/pyeve and rudykocur/breve which is simplest way to create or generate html from controllers or views and others php files.
No need to write special macros for compontens.
Code can be written from PHP View Class or View-Controller (Presenter) or PHP Html helper (utils) class.
(Polymorphism, Inheritance, Overloading, Overriding)
Your HTML is more readable and clean html code.
If you open tag - you open as function and it must have parenthesis. You don't need to remember close tags.
To start using this library you can add package to your composer.json to require section below record:
After that, run:
user@mashine /project/dir/path/ $ 'composer update'
Enjoy! Import library and use like in example.
First of all you need import the main class which is Set of HTML tags.
The next step is create class or method in your favourite class or add below code to your existing method:
Let's go to learn method syntax and API documentation. Each method in Tag class is magical method, and it means that everything what you write after "->", each method name, it's become HTML tag.
Below methods was defined as
@method annotation only. They doesn't exists in class Tag!
a method - achnor:
a( array $htmlAttributes = array (), array|mixed $content = null )
a( Attribute ... $attributes, array|mixed $content = null )
Hyperlinks or links method.
Parameters (for main definition)
Parameters (for alternative definition)
Attributeand object returned by static magic method!