minerva/orm

Minerva ORM

v1.2.3 2020-03-31 12:37 UTC

This package is auto-updated.

Last update: 2024-03-29 02:51:20 UTC


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

687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67
Check out our other projects at linkorb.com/engineering.

Btw, we're hiring!