PHPackages                             pomm/pomm-service-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. pomm/pomm-service-provider

ActiveLibrary[Database &amp; ORM](/categories/database)

pomm/pomm-service-provider
==========================

Pomm service provider for the Silex µframwork.

1.2.0(12y ago)41.9k4MITPHP

Since Oct 30Pushed 12y ago2 watchersCompare

[ Source](https://github.com/chanmix51/PommServiceProvider)[ Packagist](https://packagist.org/packages/pomm/pomm-service-provider)[ Docs](https://github.com/chanmix51/PommServiceProvider)[ RSS](/packages/pomm-pomm-service-provider/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (6)Used By (0)

PommServiceProvider for Silex
=============================

[](#pommserviceprovider-for-silex)

This is the [Pomm](https://github.com/chanmix51/Pomm) service provider for the [Silex](https://github.com/fabpot/Silex) microframework.

Installation
------------

[](#installation)

There are numerous ways to install *PommServiceProvider*. The sortest one being to use [this script](https://gist.github.com/chanmix51/3402026). It will create directory tree structure and your `composer.json` file (See Composer section below).

### Composer

[](#composer)

[Composer](http://packagist.org/packages/pomm/pomm-service-provider) is the easiest way to get the Service provider installed and running. Just add your `composer.json` the following:

```
"pomm/pomm-service-provider":    "dev-master"
```

in the `require` section. Invoke « `composer.phar install` » and it should be installed with the `Pomm` library.

### Git submodules

[](#git-submodules)

If you use git, use the submodules:

```
$ mkdir vendor
$ git submodule add git://github.com/chanmix51/PommServiceProvider.git vendor/ghub/PommServiceProvider
$ git submodule add git://github.com/chanmix51/Pomm.git vendor/pomm
```

Otherwise, you can just download the archive, expand it in a subdirectory and tell the autoloader that `GHub\Silex\Pomm` namespace is under the `src` project subdirectory.

Using Pomm Service
------------------

[](#using-pomm-service)

It is advised to split your application in 3 files:

bootstrap.phpWhere extensions are loaded and configuredapplication.phpWhere you define your controllers.generate\_model.phpThe CLI tool to scan the postgresql's schemas and generate the model files.This way, the *index.php* file is reduced to its simplest expression:

```
