pomm-project/pomm-service-provider

Name: pomm-service-provider

Owner: pomm project

Description: Silex service provider for Pomm2

Created: 2014-11-23 20:45:53.0

Updated: 2017-08-28 04:54:44.0

Pushed: 2016-11-25 20:08:14.0

Homepage: null

Size: 24

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Pomm Service Provider

Monthly Downloads License

This package contains a Pomm2 ServiceProvider for the Silex micro-framework version 1.x. You can access the provider for Silex 2.x on the master branch of this project.

Installation

Here is a sample composer.json file:


    "require": {
        "pomm-project/pomm-service-provider":   "dev-silex-1",
        "pomm-project/cli":                     "2.0.*@dev",
        "pomm-project/model-manager":           "2.0.*@dev",
        "pomm-project/foundation":              "2.0.*@dev",
        "silex/silex":                          "1.2.*"
    }

Setup
p

->register(new PommProject\Silex\ServiceProvider\PommServiceProvider(),
[
    'pomm.configuration' =>
    [
        'my_db1' => ['dsn' => 'pgsql://user:pass@host:port/db_name'],
        'my_db2' =>
            [
                'dsn' => ? ,
                'class:session_builder' => '\PommProject\ModelManager\SessionBuilder',
            ],
        ?
    ],
    'pomm.logger.service' => 'monolog', // default
]

If you want to use the ModelManager package, be sure to specify either the model manager SessionBuilder or, better: your project session builder.

Usage
p

rator = $app['pomm']['my_db']
->getQueryManager()
->query('select ?', ['param1', 'param2', ? ]);

Check out


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.