2017 © Pedro Peláez
 

library pomm-module

Zend Framework 2 Module that provides Pomm2 basic functionality

image

pomm-project/pomm-module

Zend Framework 2 Module that provides Pomm2 basic functionality

  • Wednesday, June 14, 2017
  • by chanmix51
  • Repository
  • 4 Watchers
  • 6 Stars
  • 13,563 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

PommModule

Pomm module to use Pomm2 with zf2, (*1)

If you want to use Pomm 1.x, there's a 1.0 branch., (*2)

Installation

This package can be installed via composer, (*3)

https://packagist.org/packages/pomm-project/pomm-module, (*4)

Configuration

Just add it to your application configuration file, (*5)

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., (*6)

Usage

All generated files will be saved in a "Database" module. You can add your own files like specific SessionBuilder in the module., (*7)

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, (*8)

./vendor/bin/phpunit test

TODO

  • Add a generator for model layer
  • Add a generator for ZF2 configuration

The Versions

14/06 2017

dev-master

9999999-dev http://www.pomm-project.org/

Zend Framework 2 Module that provides Pomm2 basic functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module pomm2

14/06 2017

3.0.0

3.0.0.0 http://www.pomm-project.org/

Zend Framework 2 Module that provides Pomm2 basic functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module pomm2

14/06 2017

3.0.1

3.0.1.0 http://www.pomm-project.org/

Zend Framework 2 Module that provides Pomm2 basic functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module pomm2

09/02 2016

2.0.0

2.0.0.0 http://www.pomm-project.org/

Zend Framework 2 Module that provides Pomm2 basic functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module pomm2

25/03 2015

1.0.x-dev

1.0.9999999.9999999-dev http://www.pomm-project.org/

Zend Framework 2 Module that provides Pomm basic functionality

  Sources   Download

MIT

The Requires

 

zf2 module pomm