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 1mo ago

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 22% 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://www.gravatar.com/avatar/8b93b3068e240c8b8802621d80a9532c7adb30a8149b563127efc41b1086c739?d=identicon)[karborator](/maintainers/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

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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