Download the PHP package terminusstudio/ezdb without Composer
On this page you can find all versions of the php package terminusstudio/ezdb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ezdb
ezDB
Notice
This branch contains the latest release of ezDB v1.0. This version is not fully compatible with v0.1 and is also not fully compatible with Laravel Eloquent.
v1.0 only supports PHP 8.1, and it should support PHP 8.2 on release.
Please find v0.1 from here.
Description
ezDB is a lightweight library that provides an easy and fast to deal with databases in PHP. It manages connections, provides a query builder, and a lightweight ORM.
This project was inspired by ezSQL and Laravel Eloquent. It borrows most of its syntax from Eloquent and I would like to thank all the awesome developers that worked have worked on it.
The ORM in this library is lightweight and focuses on providing basic functionalities. If you require more functions you can easily extend the library or use a PHP ORM like DoctrineORM.
Install
With Composer
ezDB can be installed using composer by running the command below,
and require the autoload.php
file in your script.
Without Composer
ezDB can also be included manually. This is very useful for simple projects that only wants to use ezDB for managing database connections.
Follow the steps below:
- Download the latest release from here.
- Extract the ezDB folder to your project.
-
In your program include the following line,
- This will include all the files that are necessary for ezDB to function. To improve performance, create a copy of load.php and include only the classes that you will use.
How ezDB Works
ezDB can be seperated into three different parts,
The Builder (along with the Processor) are at the core of ezDB. They support generating the SQL queries from code.
The Connection classes allow you to manage database connections using multiple drivers and processors. Support queries, prepared statements etc. A global class manages as many connection to as many database as you need. The connections class also supports the IConnectionAwareBuilder
which extends the builders and provides support to directly interact with the database from the builder.
Finally, the Model layer provides a basic ORM and is also capable of managing relationships. It uses the Connection classes, and it's custom builders, ModelAwareBuilder
(which extends from ConnectionAwareBuilder
) and RelationshipBuilder
. It supports more features like timestamps, relationship querying, eager loading etc.
License
Copyright © Terminus Studio
Licensed under the MIT license, see LICENSE.md for details.