Download the PHP package hegentopf/easy-orm without Composer
On this page you can find all versions of the php package hegentopf/easy-orm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hegentopf/easy-orm
More information about hegentopf/easy-orm
Files in hegentopf/easy-orm
Download hegentopf/easy-orm
More information about hegentopf/easy-orm
Files in hegentopf/easy-orm
Vendor hegentopf
Package easy-orm
Short Description Lightweight ORM for PHP with automatic model generation
License MIT
Package easy-orm
Short Description Lightweight ORM for PHP with automatic model generation
License MIT
Please rate this library. Is it a good library?
Informations about the package easy-orm
EasyORM Usage Guide
This document provides examples and explanations for using EasyORM, including model creation, query building, and fetching data.
Installation
Install via Composer:
Basic Usage
Initial Setup for Creation and Usage
Model Creation
This will generate models for all tables in your current database.
Using Models
QueryBuilder Examples
Simple Select
Select with Where, GroupBy, OrderBy
Joins
Subqueries
Notes and Best Practices
- SQL-Injections are prevented by using prepared statements.
- Joined Data can be accessed via magic getters, e.g.,
$model->getJoinedColumnName(). - Date, DateTime, and Timestamp columns are automatically converted to
DateTimeobjects. Note that the DateTime object is a copy, so modifying it does not change the model's value. To change the value, use the setter method. - Use
new DbExpression( 'NOW()' )for raw SQL expressions when needed (⚠️ be aware of SQL-Injections). - Use
take()andskip()as alternatives tolimit()andoffset(). - To fetch only one model, use
first()instead ofget()and you will receive a single model ornull. - Columns are automatically mapped to protected properties.
- Only changed Columns are updated in the database.
- Generated models follow camelCase conversion from table and column names.
order_items→orderItems
All versions of easy-orm with dependencies
PHP Build Version
Package Version
The package hegentopf/easy-orm contains the following files
Loading the files please wait ...