Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sviiiter/yii1-repository-example

use Active Record in Repository pattern context
https://github.com/sviiiter/yii1-repository-example

activerecord repository-pattern yii

Last synced: 2 days ago
JSON representation

use Active Record in Repository pattern context

Awesome Lists containing this project

README

        

# Implemintation of Repository pattern for ActiveRecord(yii1 example)

## The sketch described how to use Active Record in Repository pattern context

Profit:

- available to test
- divide Active Record model and extracting data

````
$repo = (new ProductStoreRepository(new FromProductStrategy($product->stores)));

$a = $repo->enabled();
$b = $repo->getWeaks();
$c = $repo->notEmpty();

````