fgslframework/framework

此包已被 弃用 并不再维护。作者建议使用 fgsl/mvc 包。

Laminas 的扩展


README

Laminas 的扩展

这些组件简化了使用 Laminas 框架构建 Web 应用程序的过程。

身份验证

  • Fgsl\Authentication\Adapter\DoctrineTable

该类是一个数据库适配器,使用 Doctrine EntityManager 建立连接。

Db

  • Fgsl\Db\DoctrineManager\DoctrineManager
  • Fgsl\Entity\AbstractEntity

这两个组件允许将 Doctrine 集成为应用程序的 ORM 管理器。

  • Fgsl\TableGateway\AbstractTableGateway
  • Fgsl\TableGateway\AbstractTableModelGateway

这些组件是 Laminas 默认 TableGateway 的改进。第一个使用 ActiveRecord 模式。

表单

  • Fgsl\Form\AbstractForm

该组件允许使用比 Laminas 默认 Form 更少的代码定义动态表单。

输入过滤器

  • Fgsl\InputFilter\InputFilter

该组件改进了 Laminas 默认的 InputFilter

模型

  • Fgsl\Model\AbstractActiveRecord

该组件定义了模型的最低结构,并由 MVC 组件使用。该类实现了 Active Record 模式。它替代了旧类 AbstractModel

  • Fgsl\Model\AbstractModel

该组件定义了模型的最低结构,并由 MVC 组件使用。它与数据库表记录无关。

重要:3.0.1 和 3.1.0 之间存在兼容性问题。3.0.1 之前使用 AbstractModel 创建的类必须从 3.1.0 开始使用 AbstractActiveRecord。

MVC

  • Fgsl\Mvc\Controller\AbstractCrudController

该组件使用 Laminas\Db 简化 CRUD 页面(带分页)的创建。

  • Fgsl\Mvc\Controller\AbstractDoctrineCrudController

该组件使用 Doctrine 简化 CRUD 页面(带分页)的创建。

服务管理器

  • Fgsl\ServiceManager\ServiceManager

该组件是应用程序 DI 容器的一个助手。

视图

  • Fgsl\View\JSHelper

该组件帮助以有组织的方式在视图脚本中加载 JavaScript。