thomasleconte/laminas-gen
Composer 安装命令:
composer require thomasleconte/laminas-gen
包简介
Package for generate modules / controllers / forms with Laminas Framework.
README 文档
README
Do you know Symfony's generating commands ? It's the same, for Laminas Framework :)
install it
Just use composer require thomasleconte/laminas-gen !
Config it
You need to provide this script in your composer.json file for make this lib able to be used.
"scripts": { ... "laminas-gen": [ "LaminasGen\\Handler::handle" ], ... }
Use it
Module generation
composer laminas-gen module <yourModuleName> (By default, this will generate an associated controller for be able to use your module fast as possible. But you can disable it using an optional argument : without-extra. So you can use command like that composer laminas-gen module <yourModuleName> without-extra)
Controller generation
composer laminas-gen controller <yourControllerName> <existingModuleName> (This will generate all associated CRUD views for again, use your controller fast as possible. And you cant disable it ... For the moment 🥱)
Entity generation
composer laminas-gen entity <yourEntityName> <yourModuleName>. You will have to type each properties of your entity. yourEntityName.php and yourEntityNameTable.php files will be generated, with default getters and setters.
Undo
composer laminas-gen undo (This will undo all last creations or modifications done by LaminasGen)
composer laminas-gen undo-all (This will undo all creations or modification done since you use it)
Details
When you will have installed this package, you will be able to edit templates in src/Generators/templates/ folder. But keep in mind that you will have limited possibilites, due to number of variables understood by my script. So you can edit the script for make my script understanding your variables :)
Debug it
1 - Run autoload command before work on project : composer dump-autoload -o
2 - Good luck dude.
Reminder
If you want to use package during debug, add these lines on your test project :
"repositories": [ { "type": "path", "url": "absolute/or/relative/path/to/laminas-gen/folder" } ]
Then, just install it with : composer require thomasleconte/laminas-gen @dev.
Take care about @dev, composer uses this to pickup the source code and symlink it to your new package.
thomasleconte/laminas-gen 适用场景与选型建议
thomasleconte/laminas-gen 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 5, 最近一次更新时间为 2021 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 thomasleconte/laminas-gen 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 thomasleconte/laminas-gen 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-02