PHPackages                             baohx2000/doc - 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. [Framework](/categories/framework)
4. /
5. baohx2000/doc

ActiveLibrary[Framework](/categories/framework)

baohx2000/doc
=============

Doctrine provider for Silex

v0.1.0(10y ago)040[5 PRs](https://github.com/baohx2000/doc/pulls)MITPHP

Since Apr 19Pushed 2y agoCompare

[ Source](https://github.com/baohx2000/doc)[ Packagist](https://packagist.org/packages/baohx2000/doc)[ RSS](/packages/baohx2000-doc/feed)WikiDiscussions master Synced 1mo ago

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

What's (up) Doc?
================

[](#whats-up-doc)

Doc is a combination of multiple existing Doctrine-related service providers to provide a full-featured Doctrine integration for Silex applications, including:

- DBAL
- ORM (including having multiple Entity Managers)
- Migrations

Doc SETUP
=========

[](#doc-setup)

Set your migrations directory within one of your application service providers: $app\['migrations.directory'\] = '/some/directory'; `$app->register(new DocServiceProvider);`

Doctrine ORM Service Provider
=============================

[](#doctrine-orm-service-provider)

Heavily based on (and utilizes) dflydev/doctrine-orm-service-provider, so just copypasting those instructions below.

Provides Doctrine ORM Entity Managers as services to Pimple applications.

Features
--------

[](#features)

- Leverages the core [Doctrine Service Provider](http://silex.sensiolabs.org/doc/providers/doctrine.html) for either Silex or Cilex.
- Default Entity Manager can be bound to any database connection
- Multiple Entity Managers can be defined
- Mechanism for allowing Service Providers to register their own mappings

Requirements
------------

[](#requirements)

- PHP 5.3+
- Doctrine ~2.3

Currently requires both **dbs** and **dbs.event\_manager** services in order to work. These can be provided by a Doctrine Service Provider like the [Silex](http://silex.sensiolabs.org/doc/providers/doctrine.html) or [Cilex](https://github.com/Cilex/Cilex/blob/master/src/Cilex/Provider/DoctrineServiceProvider.php) service providers. If you can or want to fake it, go for it. :)

Optional Dependencies
---------------------

[](#optional-dependencies)

### PSR-0 Resource Locator Service Provider

[](#psr-0-resource-locator-service-provider)

An implementation of [dflydev/psr0-resource-locator-service-provider](http://github.com/dflydev/dflydev-psr0-resource-locator-service-provider)is required if using namespaceish resource mapping. See documentation for **orm.generate\_psr0\_mapping** for more information.

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

[](#installation)

Through [Composer](http://getcomposer.org) as [dflydev/doctrine-orm-service-provider](https://packagist.org/packages/dflydev/doctrine-orm-service-provider).

Usage
-----

[](#usage)

To get up and running, register `DoctrineOrmServiceProvider` and manually specify the directory that will contain the proxies along with at least one mapping.

In each of these examples an Entity Manager that is bound to the default database connection will be provided. It will be accessible via **orm.em**.

```
