mistralys/html_quickform2 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mistralys/html_quickform2

Composer 安装命令:

composer require mistralys/html_quickform2

包简介

Provides methods to create, validate and render HTML forms in PHP.

README 文档

README

This fork focuses on code modernization, performance and quality of life improvements.

Requirements

Installation

Add as dependency to your composer.json file with:

composer require mistralys/html_quickform2

Also see the Packagist page.

Additions and improvements

  • Chainable element methods as alternative to attribute arrays.
  • Element factory class for easy element creation.
  • Better code completion support through typed return values.
  • Ongoing overall code modernization with strict typing.
  • Quality of life improvements overall.
  • Removed dependencies on PEAR packages.

Some changes in detail:

  • Elements: set/getRuntimeProperty() method to store data at runtime
  • Default array datasource: setValues() method
  • Textarea element: setRows() / setColumns() methods
  • Elements: makeOptional() method to remove any required rules
  • Elements: hasErrors() method to check if an element has errors after validation
  • Elements: getRules() method to retrieve all rules added to the element
  • Elements: hasRules() method to check if an element has any rules
  • Elements: addRuleXXX() shorthand methods, including addRuleRequired().
  • Elements: appendComment() method to append text to an existing comment.
  • Elements: setComment() extended to allow Stringable values.
  • Elements: isFrozen() method to check if an element is frozen.
  • Containers: requireElementById() with non-null return value.
  • Text-based elements: addFilterTrim() method.
  • Select element: prependOption() method to insert an element at the top.
  • Select element: Support for selects with a custom OptGroup class.
  • Select element: OptGroups getLabel() method.
  • Select element: countOptions() method with recursive capability.
  • Select Element: Added makeMultiple() and isMultiple().
  • Select Element: Added setSize() and getSize().
  • Select Element: Added getSelectedOption().
  • Date element: Setter and getter methods for options.
  • Input elements: Added setLabel() method where relevant.
  • Checkbox element: Added setChecked() method.
  • Image element: Added setURL() method.
  • Button Element: Added makeSubmit() and makeButton().
  • Form: Added getMethod().
  • Form: Added makeMultiPart() and isMultiPart().
  • Rules: The callback rule now has a method getCallback() to retrieve the configured callback.
  • Rules: Added static setDefaultMessage() to the required rule.
  • Renderers: Added setters and getters for renderer options.
  • Renderers: Added specialized proxy classes to assist with IDE code completion.
  • Renderers: Added proxy factory methods like createArray() and createCallback().
  • Renderers: Added a Bootstrap5 renderer.

Performance tweaks

  • Container getElementById() method.
  • Auto-generated element IDs.

Element ID generation

The element ID generation mechanism has been modified, so it is no longer possible to rely on a specific naming scheme to predict the automatic element IDs. In practice, this was impractical at best anyway, and the new system has big performance gains.

Documentation

See the main branch for details and documentation: https://github.com/pear/HTML_QuickForm2

Additional documentation is available in the docs/knowledgebase folder, in the form of Markdown files.

mistralys/html_quickform2 适用场景与选型建议

mistralys/html_quickform2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 51.01k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2019 年 10 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「javascript」 「wizard」 「validation」 「Forms」 「quickform」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mistralys/html_quickform2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mistralys/html_quickform2 我们能提供哪些服务?
定制开发 / 二次开发

基于 mistralys/html_quickform2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-10-08