pomm-project/pomm-module
Composer 安装命令:
composer require pomm-project/pomm-module
包简介
Zend Framework 2 Module that provides Pomm2 basic functionality
README 文档
README
Pomm module to use Pomm2 with zf2
If you want to use Pomm 1.x, there's a 1.0 branch.
Installation
This package can be installed via composer
https://packagist.org/packages/pomm-project/pomm-module
Configuration
Just add it to your application configuration file
return array(
'pomm' => array(
'databases' => array(
'con1' => array (
// Mandatory data source name
'dsn' => 'pgsql://postgres:postgres@127.0.0.1/myschema',
// Optional session builder overload
'class:session_builder' => '\Database\ModelManager\SessionBuilder',
),
),
),
);
Session builder
You can define an optional session builder. As the "Database" module is loaded by default, it's a good idea to define it in.
Usage
All generated files will be saved in a "Database" module. You can add your own files like specific SessionBuilder in the module.
Inspection
Config
# Inspect the configuration
vendor/bin/pomm.php inspect-config
Database
# Inspect a database
vendor/bin/pomm.php inspect-database pstudio2
Schema
# Inspect a schema
vendor/bin/pomm.php inspect-schema pstudio2 public
Relation
# Inspect a relation
vendor/bin/pomm.php inspect-relation pstudio2 organization people
Generation
Model
# Generate the "people" model for "organization" schema
vendor/bin/pomm.php generate-model pstudio2 organization people --force
Structure
# Generate the "people" structure for "organization" schema
vendor/bin/pomm.php generate-structure pstudio2 organization people
Entity
# Generate the "people" relation for "organization" schema
vendor/bin/pomm.php generate-entity pstudio2 organization people --force
Relation
# Generate entity, structure and model for one relation
vendor/bin/pomm.php generate-relation-all pstudio2 organization people
All for a given schema
# Generate relation, structure and models for all relations of a schema
vendor/bin/pomm.php generate-schema-all pstudio2 organization
All for a given database
# Generate structure, model and entity file for all relations of all schemas in a database
vendor/bin/pomm.php generate-database-all pstudio2
Tests
The tests are not implemented yet. But 'll be launch with
./vendor/bin/phpunit test
TODO
- Add a generator for model layer
- Add a generator for ZF2 configuration
pomm-project/pomm-module 适用场景与选型建议
pomm-project/pomm-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 32.91k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2015 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「zf2」 「module」 「pomm2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pomm-project/pomm-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pomm-project/pomm-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pomm-project/pomm-module 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
LosLog provides some log utility
EdpModuleLayouts is very simple Laminas module for making module-specific layouts insanely easy.
Zend Framework module to leverage the symfony dependency injection container
RCM User HTML views/pages
Builds a Bridge between Zend Expressive and Plugin Managers of Zend\MVC
Error and Exception override and observers.
统计信息
- 总下载量: 32.91k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-25