PHPackages                             svenanders/sarmongo - 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. svenanders/sarmongo

ActiveLibrary

svenanders/sarmongo
===================

Lightweight MongoDB implementation

07PHP

Since Jun 30Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Database modules for ZF2
========================

[](#database-modules-for-zf2)

A ZF2 module to make connecting to databases a breeze

Currently includes support for MongoDB and MySQL. More will be added eventually

Note about MAMP and MySQL
-------------------------

[](#note-about-mamp-and-mysql)

For local testing, use 127.0.0.1 instead of localhost, and uncheck "Allow local access only" in the MAMP PRO settings.

\###More info

### How to use

[](#how-to-use)

In your composer.json, add the following line

```
"svenanders/sardatabases": "dev-master"

```

Add the following line to your **application.config.php**:

```
'modules' => array(
    'SarDatabases',
),

```

In your code, include the class:

```
use SarDatabases;

```

and then in your functions, use it like this:

```
$dbConn = new Databases\SarMongo("environment", "database", "collection");
$cursor = $dbConn->find(array("key" => "value"));

```

Supports:

```
->find
->insert
->update
->delete

```

Tests:

execute **phpunit vendor/svenanders/sardatabases/tests/** from the root of your project to run the tests

\#####License:

Sven Anders Robbestad (C) 2014

[![CC BY](https://camo.githubusercontent.com/011d72eeefe5ba12a3df6878a8693f73852fcd3627a7857c2dce5eb9401055ce/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792f332e302f38387833312e706e67)](https://camo.githubusercontent.com/011d72eeefe5ba12a3df6878a8693f73852fcd3627a7857c2dce5eb9401055ce/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792f332e302f38387833312e706e67)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5257dba340429532436352ef4feb5e76ced7a0b0ff83b302d29479192d8b1cdb?d=identicon)[svenanders](/maintainers/svenanders)

---

Top Contributors

[![robbestad](https://avatars.githubusercontent.com/u/1560743?v=4)](https://github.com/robbestad "robbestad (1 commits)")

### Embed Badge

![Health badge](/badges/svenanders-sarmongo/health.svg)

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

PHPackages © 2026

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