thijzer/html-builder

Simple PHP Html component builder

1.0.1 2019-07-20 19:51 UTC

This package is auto-updated.

Last update: 2025-04-15 03:29:05 UTC


README

Goals

This Repo is meant to making dynamic html elements easier. Most of the known component should be available as a set.

Making it possible to build menu, datagrid, table component as objects in PHP. And pass them as to you template engine.

Example

$table = new \HtmlBuilder\Table();
$table->setData($dataSet);
$table
    ->add('#', 'rowcount')
    ->add('title')
    ->add('status_code')
    ->add('h1_count')
    ->add('frequency')
    ->add('links_text', 'arrayCount')
    ->add('visited', 'boolean')
    ->add('absolute_url', 'link')
;
$table->render()