1. Go to this page and download the library: Download lagdo/html-builder library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
public function registerBuilderHelper(string $prefix, Closure $helper): void;
public function registerElementHelper(string $prefix, Closure $helper): void;
public function registerComponentHelper(string $prefix, Closure $helper): void;
use Lagdo\HtmlBuilder\Element\Element;
use Lagdo\HtmlBuilder\HtmlComponent;
use Lagdo\HtmlBuilder\HtmlElement;
use LogicException
/**
* @throws LogicException
*/
function builderHelper(string $tagName, string $method, array $arguments): Element
{
// Create and return a component
}
/**
* @throws LogicException
*/
function elementHelper(HtmlElement $element, string $tagName, string $method, array $arguments): HtmlElement
{
// Customize and return the $element object.
}
/**
* @throws LogicException
*/
function componentHelper(HtmlComponent $component, string $tagName, string $method, array $arguments): HtmlComponent
{
// Customize and return the $component object.
}