DBLayer Documentation#
DBLayer is a high-performance PHP database layer for PHP ^8.4 focused on
predictable SQL behavior, safe defaults, and practical performance features.
This manual is written for backend engineers who want a lightweight library that still provides:
A fluent query builder
Repository-level conveniences
Multi-driver support (MySQL, PostgreSQL, SQLite)
Read/write splitting with replica strategies
Transaction and retry controls
Security checks, telemetry, and profiling
How To Read This Documentation#
If you are new to the project, follow this order:
installationfor environment setup.quickstartfor a working end-to-end flow.choosing-apito choose DB vs QueryBuilder vs Repository.configurationandconnectionsto move from local to production use.table-repositoryfor repository-oriented class workflows without ORM.examples-cookbookfor ready-to-use snippets across all layers.query-builderandrepositoryfor day-to-day application code.securityandobservabilitybefore deploying.
The API reference sections are intentionally method-oriented and are best used as lookup pages after reading the guides.
Getting Started
Guides
Source#
GitHub: infocyph/DBLayer