PHPackages                             ivanvoitovych/redis-repository - 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. ivanvoitovych/redis-repository

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

ivanvoitovych/redis-repository
==============================

Redis repository implementation.

v1.1.0(3y ago)119MITPHP

Since May 28Pushed 3y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

redis-repository
================

[](#redis-repository)

Redis repository implementation.

Usage Example
-------------

[](#usage-example)

```
use RedisDb\Models\BaseEntity;

class BlogPost extends BaseEntity
{
    public string $Title;
    public string $SeoTitle;
    public string $Body;
    public string $Author;
    public int $DisplayOrder = 0;
    public bool $Published = false;
    public int $Group = 0;
}
```

```
use RedisDb\Models\BaseEntityDbMap;

class BlogPostDbMap extends BaseEntityDbMap
{
    public const ORDER_BY_ORDER = 'DisplayOrder';

    public const PROPERTY_Published = 'Published';
    public const PROPERTY_Group = 'Group';
    public const PROPERTY_SeoTitle = 'SeoTitle';

    static array $Indexes = [
        'SeoTitle_UX' => [
            'Unique' => true,
            'Properties' => [self::PROPERTY_SeoTitle]
        ],
        'Published_IX' => [
            'Unique' => false,
            'Properties' => [self::PROPERTY_Published]
        ],
        'Published-Group_IX' => [
            'Unique' => false,
            'Properties' => [
                self::PROPERTY_Group,
                self::PROPERTY_Published
            ]
        ]
    ];

    static array $Positions = [
        self::ORDER_BY_ORDER => [
            'Properties' => [self::ORDER_BY_ORDER]
        ]
    ];
}
```

```
$mapper = new StdObjectMapper();
$connector = new RedisConnector();

$repository = new BaseRepository($connector, $mapper, BlogPost::class, BlogPostDbMap::class);

$blog = new BlogPost();
$blog->Author = 'Miki the black cat';
$blog->Body = 'body sample';
$blog->DisplayOrder = $i;
$blog->Group = $i % 20;
$blog->Published = $i % 2 === 1;
$blog->SeoTitle = "blog-number-$i"; // unique
$blog->Title = "Blog $i";
$repository->Create($blog);

$repository->Update($blog);

$repository->Delete($blog);

$repository->GetList(1, 2, BaseEntityDbMap::ORDER_BY_CreatedOn, 1);
$repository->GetList(1, 2, BlogPostDbMap::ORDER_BY_ORDER, 0);

$repository->GetByKeys(
    [
        BlogPostDbMap::PROPERTY_Group => $group,
        BlogPostDbMap::PROPERTY_Published => $group % 2 === 1
    ],
    1,
    5,
    1,
    BlogPostDbMap::ORDER_BY_ORDER
    );
```

License
-------

[](#license)

MIT License

Copyright (c) 2022-present Ivan Voitovych

Please see [LICENSE](/LICENSE) for license text

Legal
-----

[](#legal)

By submitting a Pull Request, you disallow any rights or claims to any changes submitted to the Viewi project and assign the copyright of those changes to Ivan Voitovych.

If you cannot or do not want to reassign those rights (your employment contract for your employer may not allow this), you should not submit a PR. Open an issue, and someone else can do the work.

This is a legal way of saying, "If you submit a PR to us, that code becomes ours." 99.9% of the time, that's what you intend anyways; we hope it doesn't scare you away from contributing.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Every ~112 days

Total

2

Last Release

1330d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/10b718725e87c06fad1deb0e194465ee987b055f234dc81d11a7efb781744013?d=identicon)[ivanvoitovych](/maintainers/ivanvoitovych)

---

Top Contributors

[![ivanvoitovych](https://avatars.githubusercontent.com/u/9718423?v=4)](https://github.com/ivanvoitovych "ivanvoitovych (6 commits)")

### Embed Badge

![Health badge](/badges/ivanvoitovych-redis-repository/health.svg)

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

###  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.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M543](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

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

PHPackages © 2026

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