Strict repository pattern classes for CodeIgniter 4
- Install with Composer:
> composer require tatter/repositories
- Create your Entities extending
Tatter\Repository\Entity
- Create your Repositories implementing
Tatter\Repository\RepositoryInterface
Repositories is an alternate take on the data access layer for CodeIgniter 4. Following the Repository Design Pattern, these classes work as a 1:1 replacement for your traditional framework Models, or as a part of a larger unit-of-work structure for Domain Driven Design.
Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities and always be up-to-date:
> composer require tatter/repositories
Or, install manually by downloading the source files and adding the directory to
app/Config/Autoload.php
.
More docs coming soon! In the meantime, see the example classes in Testing for inspiration.
Pull Requests and Bug Reports are gladly accepted! Any feedback, suggestions, and general discussions should be in Discussions.
New feature requests and support questions should be opened as a discussion first and will be moved to Issues as necessary. There is no guarantee that these will be addressed, but priority will be given based on sponsorship (see "Sponsor this project").