icetea/icedom
最新稳定版本:1.0.0
Composer 安装命令:
composer require icetea/icedom
包简介
PHP pure and simple VDOM
README 文档
README
IceDOM is a pure PHP library for building HTML documents using a Virtual DOM-like approach. Write HTML in PHP with a fluent, type-safe API—no templates required. All content is automatically escaped to prevent XSS attacks.
Key Features
- 🔒 Automatic XSS Protection - All content is escaped by default
- 🎯 Type-Safe - Full IDE autocomplete and type hints
- 🔄 Virtual DOM-like - Build HTML using PHP objects and methods
- 🎨 Fluent API - Chain methods for clean, readable code
- 🚀 Zero Dependencies - Pure PHP, no external libraries
- 📦 150+ HTML Tags - All standard HTML5 elements included
Quick Example
use function IceTea\IceDOM\{_div, _h1, _p, _button}; $card = _div(['class' => 'card'], [ _h1('Welcome to IceDOM'), _p('Build HTML with PHP, fluently and safely.'), _button(['class' => 'btn-primary'], 'Get Started'), ]); echo $card; // Output: <div class="card"><h1>Welcome to IceDOM</h1>...</div>
Installation
You can install the package via composer:
composer require icetea/icedom
Usage
Read full usage document here : Usage
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Ideas, Write Core Classes, Review Docs - Tests : KhanhIceTea
- PHPDocs, Tests : LLMs (because it writes these better and faster than me)
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-13