Skip to content

About

Object-relational mapping

Resources

Code of conduct

Contributing

Stars

12 stars

Watchers

3 watching

Forks

Repository files navigation

Active Record

Release Code Coverage Downloads

Connections, models and active records are the foundations of everything that concerns database access and management. They are used to establish database connections, manage tables and their relationships, as well as manage the records of these tables. Leveraging OOP, models and active records are classes whose properties, getters/setters, and behavior can be inherited in a business logic.

Using the query interface, you won't have to write raw SQL, manage table relationships, or worry about injection.

Finally, using registries you can define all your connections and models in a single place. Connections are established and models are instantiated on demand, so feel free to define hundreds of them.

Requirements

  • PHP 8.4+
  • The pdo extension, with the driver of your database: SQLite, MySQL, or PostgreSQL.

Installation

composer require icanboogie/activerecord

To use the package with the ICanBoogie framework, install icanboogie/bind-activerecord instead.

Documentation

See CHANGELOG for the changes between versions, and how to upgrade.

Acknowledgments

The implementation of the query interface is vastly inspired by Ruby On Rails' Active Record Query Interface.


Continuous Integration

The project is continuously tested by GitHub Actions.

Tests Static Analysis Code Style

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you're expected to uphold this code.

Contributing

See CONTRIBUTING for details.

About

Object-relational mapping

Resources

Code of conduct

Contributing

Stars

12 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages