{"repo":"byjg/php-micro-orm","free":true,"listed":false,"github":"https://github.com/byjg/php-micro-orm","clone":"git clone https://github.com/byjg/php-micro-orm.git","description":"A micro framework for create a very simple decoupled ORM (sqlite, mysql, postgres, sqlserver)","language":"PHP","stars":20,"topics":["micro-framework","mysql","sqlite3","sqlserver","entity","mysql-orm","orm","byjg"],"license":"MIT","category":"databases-storage","readme_excerpt":"--- sidebar key: micro-orm tags: [php, databases, orm] --- MicroOrm for PHP A micro framework for create a very simple decoupled ORM. This library intended to be very small and very simple to use; Key Features: Can be used with any DTO, Entity, Model or whatever class with public properties or with getter and setter The repository support a variety of datasources: MySql, Sqlite, Postgres, MySQL, Oracle (see byjg/anydataset) A class Mapper is used for mapping the Entity and the repository Powerful mapper functions for automatic data transformation between models and database Small and simple to use Architecture MicroORM implements Martin Fowler's enterprise patterns : - Repository : Mediates between domain and data mapping layers - Data Mapper : Separates domain objects from database tables - Active Record : Wraps database rows with domain logic ( alternative approach) You can choose the pattern that best fits your application: use Repository + Data Mapper for complex domains, or Active Record for simpler CRUD-focused applications. These are the key components: Model can be any class with public properties or with getter and setter. It is used to retrieve or save the data into the database Mapper defines the relationship between the Model properties and the database fields FieldMapping defines individual field mappings within the Mapper (field names, transformations, relationships via parentTable ) Query defines what to retrieve from/update in the database. It uses the Mapper ","default_branch":null,"files":null,"tree":[],"storefront":"/r/byjg","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/byjg/php-micro-orm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}