PHPackages                             mongator/pimple - 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. mongator/pimple

ActiveLibrary[Framework](/categories/framework)

mongator/pimple
===============

Provider to use Mongator with Pimple/Silex framework

v2.0.0(12y ago)21083MITPHPPHP &gt;=5.3.0

Since May 21Pushed 12y ago2 watchersCompare

[ Source](https://github.com/mongator/pimple)[ Packagist](https://packagist.org/packages/mongator/pimple)[ RSS](/packages/mongator-pimple/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (4)Versions (2)Used By (0)

Mongator Pimple/Silex Provider [![Build Status](https://camo.githubusercontent.com/88df84982965fd0df349eac2be0fbc1ee0329c8f1cbd63418e3217322ac8eeb0/68747470733a2f2f7472617669732d63692e6f72672f6d6f6e6761746f722f70696d706c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mongator/pimple)
===========================================================================================================================================================================================================================================================================================================

[](#mongator-pimplesilex-provider-)

Provider for using Mongator with Pimple/Silex framework

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

[](#requirements)

- PHP 5.3.x
- Unix system
- fabpot/pimple
- mongator/mongator

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

[](#installation)

The recommended way to install Mongator/Silex is [through composer](http://getcomposer.org). You can see [the package information on Packagist.](https://packagist.org/packages/mongator/silex)

```
{
    "require": {
        "mongator/pimple": "2.*"
    }
}
```

Parameters
----------

[](#parameters)

- `mongator.connection.dsn` (default 'mongodb://localhost:27017'): database connection string
- `mongator.connection.database`: the database name
- `mongator.connection.name` (default 'default'): the name of the connection
- `mongator.metadata.class`: The metadata factory class name
- `mongator.logger` (default null): instance of a logger class
- `mongator.cache.fields` (default ArrayCache): instance of a mongator cache driver used in fields cache
- `mongator.cache.data` (default ArrayCache): instance of a mongator cache driver used in data cache
- `mongator.extensions` (default Array()): array of extension instances
- `mongator.models.output`: output path of the classes
- `mongator.classes.config` (default Array()): The config classes contain the information of the classes
- `mongator.classes.yaml.path`: A valid dir with YAML definitions of the config classes

Registrating
------------

[](#registrating)

```
$app->register(new Mongator\Pimple\MondatorServiceProvider());
$app->register(new Mongator\Pimple\MongatorServiceProvider(), array(
    'mongator.metadata.class' => 'Model\Mapping\Metadata',
    'mongator.models.output' => 'src/',
    'mongator.connection.database' => 'your_db'
));
```

Usage
-----

[](#usage)

```
use Symfony\Component\HttpFoundation\Response;

$app->post('/article', function ($id) use ($app) {
    $articleRepository = $app['mongator']->getRepository('Model\Article');
    $article = $articleRepository->findOneById($id);

    return new Response('', 201);
});
```

\*\* Remember, before using the models you must generate them. (You can use the command provided with this package.) \*\*

Commands
--------

[](#commands)

With this package you can find three useful commands:

- `mongator:generate`: Processes config classes and generates the files of the classes.
- `mongator:indexes`: Ensures the indexes of all repositories
- `mongator:fix`: Fixes all the missing references.

You need the suggested package `cilex/console-service-provider`to use console commands on you Silex setup.

Tests
-----

[](#tests)

Tests are in the `tests` folder. To run them, you need PHPUnit. Example:

```
$ phpunit --configuration phpunit.xml.dist

```

License
-------

[](#license)

MIT, see [LICENSE](LICENSE)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4380d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1573114?v=4)[Máximo Cuadros](/maintainers/mcuadros)[@mcuadros](https://github.com/mcuadros)

---

Top Contributors

[![mcuadros](https://avatars.githubusercontent.com/u/1573114?v=4)](https://github.com/mcuadros "mcuadros (18 commits)")[![filiptc](https://avatars.githubusercontent.com/u/2487390?v=4)](https://github.com/filiptc "filiptc (1 commits)")[![wildsurfer](https://avatars.githubusercontent.com/u/1456389?v=4)](https://github.com/wildsurfer "wildsurfer (1 commits)")

### Embed Badge

![Health badge](/badges/mongator-pimple/health.svg)

```
[![Health](https://phpackages.com/badges/mongator-pimple/health.svg)](https://phpackages.com/packages/mongator-pimple)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
