Download the PHP package analogue/orm without Composer
On this page you can find all versions of the php package analogue/orm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package orm
Short Description An intuitive Data Mapper ORM for PHP and Laravel
License MIT
Homepage http://github.com/analogueorm/analogue
Informations about the package orm
(this project is looking for a new maintainer)
Analogue ORM
Analogue is a flexible, easy-to-use ORM for PHP. It is a transposition of the Eloquent ORM that ships with Laravel framework using a Data Mapper pattern instead of the original Active Record approach. it overcomes some of Eloquent's architectural limitations by using a strict separation of concerns; for example, you can use Value Objects or Single-table-inheritance, which are hard/impossible to implement correctly using the native ORM.
As a Laravel package, it integrates flawlessly inside the framework, and provides a more powerfull peristance layer, allowing to build enterprise-grade applications while retaining a simple and enjoyable development experience.
Installation
See Configuration for more information.
Concept
The concept is simple; your model layer is defined using 2 classes : one Entity, which can be any PHP class or extends the base Analogue\ORM\Entity class which provides magic getters and setters, and one EntityMap which defines relationships, castings, table name, database column names.
Take this simple domain model :
We can instruct Analogue how these objects are related using these classes :
Now we can create related instance of or object and persist them to the database :
Once our objects are persisted into the database, we can query them using the fluent query builder :
Documentation
Check the Documentation for more details.
Features
- Framework agnostic
- Lazy loading
- Eager Loading
- Timestamps
- Soft Deletes
- Value Objects
- Polymorphic Relationships
- Dynamic Relationships
- Single table inheritance
- Cast entities to Array / Json
- Flexible event system
- Native multiple database connections support
- Extendable via custom database drivers / plugins
Changelog
Version 5.6
- Laravel 5.6 support
- Bring back ability to map DB columns that name are not equals to the name of the attribute.
- Add ability to map DB snake case columns to camel case properties on entities.
Version 5.5
- Laravel 5.5 support
- Pushed miminum requirements to PHP7
- Complete support of Plain PHP objects via reflection based hydration/dehydration
- Improved Lazy-loading proxies.
- New, more flexible Value Object implementation, that can now be defined as
embedsOne()
,embedsMany()
relationships - Embedded value object can now be stored as a mysql JSON field
- Analogue entities can now be instantiated using laravel's
IoC Container
or any PSR-11 compatible container. - Added MongoDB driver.
- Package auto discovery (L5.5)
Version 5.4
- Illuminate 5.4 Compatibility.
- Add Ability to map DB columns that name are not equals to the name of the attribute.
Version 5.3
- Illuminate 5.3 Compatibility.
- Now fully support Single Table Inheritance.
Version 5.1
- Illuminate 5.1 + 5.2 Compatibility.
Version 5.0
- Analogue version now mirrors illuminate version.
Version 2.1.3
- Mutator feature in base Entity class.
- Ability to add entities to a proxy collection without lazyloading it.
Version 2.1
- Package is now framework agnostic.
- Now support any plain object that implements Mappable interface.
- Introducing a MappableTrait for quick implementation.
- Queries can now be run directly on the mapper Object.
- Store/Delete methods now accept a array and collections as argument.
- EntityMap are now autodected when in the same namespace as the entity.
- Base Entity class Supports hidden attributes.
- Many workflow related improvements.
Version 2.0
- Laravel 5 Support.
Documentation
Check the wiki for full documentation.
Licence
This package is licensed under the MIT License.
All versions of orm with dependencies
illuminate/database Version 6.0.* | 6.1.* | 6.2.*
illuminate/events Version 6.0.* | 6.1.* | 6.2.*
illuminate/pagination Version 6.0.* | 6.1.* | 6.2.*
doctrine/instantiator Version ^1.0.0
ocramius/proxy-manager Version ^2.0.0
ocramius/generated-hydrator Version ^2.0.0
psr/simple-cache Version ~1.0
psr/container Version ~1.0