PHPackages                             generic-repository/phalcon - 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. generic-repository/phalcon

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

generic-repository/phalcon
==========================

By Edward Hieatt and Rob Mee: Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.

98PHP

Since Sep 18Pushed 10y ago2 watchersCompare

[ Source](https://github.com/karborator/generic-repository-phalcon)[ Packagist](https://packagist.org/packages/generic-repository/phalcon)[ RSS](/packages/generic-repository-phalcon/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Phalcon-generic-repository
==========================

[](#phalcon-generic-repository)

Generic repository for Phalcon-framework

Move the folder named 'repository 'somewhere in your project.In my case it will be vendor. Then, at your services file:

```
        /**
         * Autoload repository
         */
        include __DIR__ . "/../../vendor/repository/autoload.php";

        /**
         * Generic Repository
         */
        $dependencyInjector['repository'] = new GenericRepository($config, 'user');

```

At some Controller :

```
/**
 * List all created pages
 *
 * @link   /page        - method GET
 * @link   /page/1      - method GET
 */
public function indexAction($id)
{
    if (!empty($id)) {
        echo $this->repository->setModel('Page')->setCriteria(array("id = '$id'"))
            ->mergeResults()
            ->findFirst()
            ->getRelated(array('articles', 'comments'))
            ->returnAs('json');
        exit;
    }
    echo $this->repository->setModel('Page')
        ->mergeResults()
        ->findAll()
        ->getRelated(array('articles', 'comments'))
        ->returnAs('json');
    exit;

}

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

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://avatars.githubusercontent.com/u/5076985?v=4)[Nikolay Yotsov](/maintainers/karborator)[@karborator](https://github.com/karborator)

---

Top Contributors

[![karborator](https://avatars.githubusercontent.com/u/5076985?v=4)](https://github.com/karborator "karborator (14 commits)")

### Embed Badge

![Health badge](/badges/generic-repository-phalcon/health.svg)

```
[![Health](https://phpackages.com/badges/generic-repository-phalcon/health.svg)](https://phpackages.com/packages/generic-repository-phalcon)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M117](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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