pomm-project/PommModule

Name: PommModule

Owner: pomm project

Description: Pomm2 module for Zend Framework 2

Created: 2015-02-03 17:01:50.0

Updated: 2017-06-02 14:10:31.0

Pushed: 2017-06-14 09:15:25.0

Homepage: null

Size: 39

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

PommModule

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

rn 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
spect the configuration
or/bin/pomm.php inspect-config
Database
spect a database 
or/bin/pomm.php inspect-database pstudio2
Schema
spect a schema
or/bin/pomm.php inspect-schema pstudio2 public
Relation
spect a relation
or/bin/pomm.php inspect-relation pstudio2 organization people
Generation
Model
nerate the "people" model for "organization" schema
or/bin/pomm.php generate-model pstudio2 organization people --force
Structure
nerate the "people" structure for "organization" schema
or/bin/pomm.php generate-structure pstudio2 organization people
Entity
nerate the "people" relation for "organization" schema
or/bin/pomm.php generate-entity pstudio2 organization people --force
Relation
nerate entity, structure and model for one relation
or/bin/pomm.php generate-relation-all pstudio2 organization people
All for a given schema
nerate relation, structure and models for all relations of a schema
or/bin/pomm.php generate-schema-all pstudio2 organization
All for a given database
nerate structure, model and entity file for all relations of all schemas in a database
or/bin/pomm.php generate-database-all pstudio2
Tests

The tests are not implemented yet. But 'll be launch with

ndor/bin/phpunit test
TODO

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.