定制 friedolinfoerder/html-changer 二次开发

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

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

friedolinfoerder/html-changer

最新稳定版本:v0.1.6

Composer 安装命令:

composer require friedolinfoerder/html-changer

包简介

Parse html and change it's output

README 文档

README

With this tiny library you can parse html code and change it's output. Other than many other similar modules, this library do not change the existing code while parsing. So you can only change the parts you need to change, while leaving all other code as is.

Installation

composer require friedolinfoerder/html-changer

Usage

use html_changer\HtmlChanger // parse html $htmlChanger = new HtmlChanger($html); // search and replace text $htmlChanger = new HtmlChanger($text, [ 'search' => [ 'test' => [ 'value' => 'TEST', 'caseInsensitive' => false, // default false 'wordBoundary' => true, // default true 'group' => 1, // default is the key (here 'test')  'maxCount' => 3, // default -1, means no rescriction ] ], 'ignore' => [ 'b', 'h1', 'h2', 'a', '.ignored', '#ad', ] ]); $htmlChanger->replace(function ($text, $value) { return $text . '/' . $value; }); // print html code print $htmlChanger->html();

统计信息

  • 总下载量: 6.51k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固