krypton/element

PHP 中的 A 元素类

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

This package is auto-updated.

Last update: 2024-09-30 02:13:11 UTC


README

PHP 元素类允许您打印 HTML 元素。

如何安装?

composer require krypton/element

如何使用?

一个简单的例子 ...

<?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();

许可证

本类根据 GPL 许可证提供https://gnu.ac.cn/licenses/gpl.html