How odutko/idiorm works
Project Type and Purpose
• This is an open-source PHP library (Idiorm) providing a lightweight, zero-configuration object-relational mapper (ORM) and fluent query builder.
• It’s designed to plug into any PHP project via Composer or by including the single idiorm.php file.
• Provides a simple API layer on top of PHP’s PDO to build and execute SQL queries safely.
File Structure
Top-level:
• idiorm.php – the core library file defining the ORM class and related helpers.
• composer.json – package metadata and autoloading.
• demo.php – example usage in a standalone script.
• README.markdown, CONTRIBUTING.md – project overview and contribution guidelines.
• .github/workflows/idiorm-workflow.yml – CI definition for GitHub Actions.
• phpunit.xml – PHPUnit configuration for running tests.
Directories:
• docs/ – Sphinx-based documentation sources (ReStructuredText + Makefile) for site generation.
• test/ – PHPUnit test suite, including integration tests (CacheIntegrationTest.php), unit tests, bootstrap, and a Docker setup for PHP 5.2 compatibility (test/docker_for_php52/).
README for Additional Insights
• Core class: ORM.
• Relies on PDO and prepared statements.
• Supports multiple drivers (SQLite, MySQL, PostgreSQL, Firebird).
• API features: method chaining, raw queries, caching hooks, multiple connections.
• Uses GitHub Actions + Docker for CI across PHP versions.
• Documentation built with Sphinx in docs/.