krypton/element

A element class in PHP

0.0.1-alpha 2023-05-31 20:22 UTC

This package is auto-updated.

Last update: 2025-06-29 02:01:18 UTC


README

The PHP Element Class allows you to print html element.

How to install?

composer require krypton/element

How to use?

A simple example ...

<?php

use Krypton\Element\Element;

$alert = [
  'name' => 'div',
  'attrs' => [
      'class' => 'alert alert-info',
      'role' => 'alert'
   ],
  'elements' => [
      [
         'name' => 'string',
         'content' => 'A simple info alert—check it out!'
      ]
   ]
];

$element = new Element($alert['name'], $alert['attrs'], $alert['elements']);
$element->render();

License

This class is provided as per the GPL license http://www.gnu.org/licenses/gpl.html