Skip to content
@InitORM

InitORM

QueryBuilder + DBAL + ORM

InitORM

Lightweight, PDO-based PHP database stack — Query Builder, DBAL, Database Manager, and ORM as independent Composer packages.

MITPHP 8.0+Packagist downloads


InitORM is an open-source PHP database stack distributed under the MIT license. Each layer is its own Composer package, so you can pull in only the layer you need.

Packages

PackagePurposeComposer
QueryBuilderPure SQL query assembly with parameter bindingcomposer require initorm/query-builder
DBALPDO connection lifecycle + data mappercomposer require initorm/dbal
DatabaseQuery Builder + DBAL with CRUD shortcuts and a static facadecomposer require initorm/database
ORMModels, entities, accessors/mutators, soft deletescomposer require initorm/orm

How the layers fit together

QueryBuilder ─┐
├─► Database ─► ORM
DBAL ─────────┘

Pick the lowest layer that solves your problem — you do not have to take the full ORM if all you need is a query builder.

Quick start

composer require initorm/orm
useInitORM\ORM\Model;
class User extends Model
{
protectedarray$credentials = [
'dsn' => 'mysql:host=localhost;dbname=test',
'username' => 'root',
'password' => '',
];
protectedstring$schema = 'users';
protectedstring$schemaId = 'id';
}

Documentation

Each package ships its own GitHub Wiki:

Community

  • Bug reports → open an issue in the affected package repository
  • Questions & ideas → start a Discussion
  • Security disclosures → see SECURITY.md

Contribution guidelines live in CONTRIBUTING.md (also available in Turkish).

initorm-icon

Pinned Loading

  1. DatabaseDatabasePublic

    Fluent CRUD, transactions and query logging for PHP 8.1+ — composes initorm/dbal and initorm/query-builder.

    PHP

  2. ORMORMPublic

    Lightweight PHP ORM with Active Record models and entity accessors/mutators. Soft deletes, timestamps, and permission gates on top of initorm/database.

    PHP

Repositories

Showing 5 of 5 repositories

Top languages

Loading…

Most used topics

Loading…