mjohnson/decoda
Composer 安装命令:
composer require mjohnson/decoda
包简介
A lightweight lexical string parser for BBCode styled markup.
README 文档
README
A lightweight lexical string parser for BBCode styled markup.
Contributors
- "Marten-Plain" emoticons by Mårten Lundin - http://adiumxtras.com/index.php?a=xtras&xtra_id=6920
- "HTML_BBCodeParser" by Seth Price - http://pear.php.net/package/HTML_BBCodeParser/
Framework Integrations
- CakePHP - using Markup plugin.
- Symfony - using FMBbCodeBundle.
Features
- Parses custom code to valid (X)HTML markup
- Setting to make links and emails auto-clickable
- Setting to use shorthand text for links and emails
- Filters to parse markup and custom code
- Hooks to execute callbacks during the parsing cycle
- Loaders to load resources and files for configuration
- Engines to render complex markup using a template system
- Can censor offensive words
- Can convert smiley faces into images
- Basic support for localized messages
- Parser result caching
- Supports a wide range of tags
- Parent child node hierarchy
- Fixes incorrectly nested tags by removing the broken/unclosed tags
- Self closing tags
- Logs errors for validation
- Tag and attribute aliasing
Filters
The following filters and supported tags are available.
- Default - b, i, u, s, sup, sub, br, hr, abbr, time
- Block - align, float, hide, alert, note, div, spoiler, left, right, center, justify
- Code - code, source, var
- Email - email, mail
- Image - image, img
- List - list, olist, ol, ul, li, *
- Quote - quote
- Text - font, size, color, h1-h6
- Url - url, link
- Video - video, youtube, vimeo, veoh, liveleak, dailymotion, myspace, wegame, collegehumor
- Table - table, thead, tbody, tfoot, tr, td, th, row, col
Hooks
The following hooks are available.
- Censor - Censors all words found within config/censored
- Clickable - Converts all non-tag wrapped URLs and emails into clickable links
- Emoticon - Converts all smilies found within config/emoticons into emoticon images
Storage Engines
The following caching layers are supported.
- In-Memory
- Memcache
- Redis
Installation and Usage
See docs.
mjohnson/decoda 适用场景与选型建议
mjohnson/decoda 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.34M 次下载、GitHub Stars 达 192, 最近一次更新时间为 2012 年 07 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「parser」 「filter」 「markup」 「HOOK」 「bbcode」 「decoda」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mjohnson/decoda 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mjohnson/decoda 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mjohnson/decoda 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated again
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
Nova searchable filter for belongsTo relationships.
Symfony DataGridBundle
An MT940 bank statement parser for PHP
A Processor for Markup written in PHP. Allows extraction of Markup into a data structure, orchestrated nested manipulation of said structure, and output as (optimized) Markup.
统计信息
- 总下载量: 1.34M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 197
- 点击次数: 30
- 依赖项目数: 15
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2012-07-08