minerva / orm
Minerva ORM
Installs: 2 572
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: >=5.5.0
README
Simple ORM/DataMapper library using the Repository pattern.
Usage
To create a new Repository class for your models, create a class that extends from Minerva\Orm\BasePdoRepository
:
<?php namespace Acme\Example\Repository; use Minerva\Orm\BasePdoRepository; class BlogRepository extends BasePdoRepository { }
To instantiate your repository, simply call:
$blogRepo = new PdoBlogRepository($pdo); $blogs = $blogRepo->findAll(); // returns a list of all blog objectstore $blog = $blogRepo->find(1); // returns blog with id 1
License
MIT (see LICENSE.md)
Brought to you by the LinkORB Engineering team
Check out our other projects at linkorb.com/engineering.
Btw, we're hiring!