PHPackages                             pete-robinson/super-simple-orm - 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. pete-robinson/super-simple-orm

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

pete-robinson/super-simple-orm
==============================

A super-simple ORM for projects that require a minor database layer.

05PHP

Since Jul 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/pete-robinson/Super-Simple-ORM)[ Packagist](https://packagist.org/packages/pete-robinson/super-simple-orm)[ RSS](/packages/pete-robinson-super-simple-orm/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Super-Simple-ORM
================

[](#super-simple-orm)

A super-simple ORM extended from PDO for projects that require a minor database layer.

This ORM essentially allows you to implement a simple ORM layer for projects with a simple level of database interaction where you may not want to use a more robust solution such as Doctrine.

Architecture
------------

[](#architecture)

Each table in data must have corresponding Entity and Repository classes. As with other ORMs, an Entity represents a single instance of data and a repository deals with data as a collection (i.e. Entity = a car. Repository = many cars).

The Factory class is used for fetching repositories which will return an instance of the repository for the requested data structure.

Entity classes must be written and passed to the repository class to be persisted to the database.

Usage
-----

[](#usage)

Each data strucutre requires an Entity and a Repository class.

To create an entity, you must implement the interface SuperSimple\\ORM\\Entity\\EntityInterface. An entity class essentially consists of getters and setters for your data structure.

```
