MySqliWrapper — A new ORM for PHP

What is an ORM?

An ORM (or Object Relational Mapping tool) is a tool for converting data between incompatible type systems using object-oriented programming languages. This creates, in effect, a “virtual object database” that can be used from within the programming language.

— Wikipedia

Why did I decide to do this?

Over the past few years I have been working on an API framework called Synful. This framework has been relying on Eloqent by Taylor Otwell as it’s database layer.

For a quite some time now I have been wanting to replace this piece with something of my own, and the time has come.

I have finally begun development on a new ORM.

The ORM is still in it’s very early stages. I expect many more features to be added in the coming months.

What does it support?

Currently, it supports MySql Database Connections, a basic implementation of Models and a basic implementation of QueryBuilders.

The future

In the future I’m hoping to add support for a few different database drivers out of the box, support for third party custom database drivers and some sort of a system for managing database creation and roll back (similar to Eloquent’s Migrations.)


You can find all of the documentation for this project on it’s Wiki pages.

A small example of the ORM in action

$user = DataBase::get('main')
                ->where('name', '=', 'Nathan')

Where can I find out more?

You can find out more about this ORM by viewing it’s GitHub Page. And if you like what you see, consider following the project and maybe dropping a star!