定制 oscurlo/component-renderer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oscurlo/component-renderer

最新稳定版本:v1.2.0

Composer 安装命令:

composer require oscurlo/component-renderer

包简介

Lightweight PHP library for rendering reusable HTML components — inspired by JSX, built on DOMDocument, no build step required.

README 文档

README

Packagist Version Total Downloads PHP License

A lightweight PHP library for rendering reusable HTML components — inspired by JSX, built on DOMDocument, no build step required.

Documentation

Quick start

composer require oscurlo/component-renderer
use Oscurlo\ComponentRenderer\ComponentRenderer;

$renderer = new ComponentRenderer([
    'MyApp\\Components' => ['Button', 'Card'],
]);

$renderer->render('<Card title="Hello"><Button>Click me</Button></Card>');

Examples

# What it shows
example1.php Multiple components — functions, namespaces, class methods
example2.php Output buffering with start() / end()
example3.php Templates with variables via Component::template()
example4.php Static API with Component::render()
example5.php PropsCaster — type-safe props (bool, int, array…)
example6.php Nested components + Bootstrap::accordion inside a card

Requirements

  • PHP >= 8.0
  • ext-dom
  • ext-libxml

Support

Buy me a coffee Donate with PayPal

统计信息

  • 总下载量: 57
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固