2017 © Pedro Peláez
 

library chaos-orm

Data Abstraction Layer.

image

crysalead/chaos-orm

Data Abstraction Layer.

  • Thursday, July 5, 2018
  • by jails
  • Repository
  • 2 Watchers
  • 1 Stars
  • 886 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 17 % Grown

The README.md

Chaos - Domain Modeling Library

Build Status Build Status Scrutinizer Coverage Status, (*1)

Chaos is an independent, persistence-agnostic layer responsible for defining entities' business logic and relationships. It allows to describe a Domain Model without any assumption about the persistence layer., (*2)

Note: The Chaos syntax is derived from li3. If the syntax is not fully compatible with its predecessor, some effort has been made to keep the same clean and beautiful syntax., (*3)

Available datasources libraries: * chaos-database: supports MySQL and PostgreSQL., (*4)

Chaos dramatically simplify the developpment of a datasources libraries by providing all persistence-agnostic logic like relationships, eager/lazy loading, validations, etc. at the root level. The only requirement is the datasource you envisionned to use need to be able to fetch a record/document thanks to a unique identifier (i.e no composite primary key)., (*5)

Requirements

  • PHP 5.5+

Main Features

  • Support eager/lazy loading
  • Support custom finders
  • Support nested saving
  • Support nested validations
  • Support external & embedded relationship
  • Support custom types & entities' field casting

Example of syntax:

use My\Project\Model\Images;

// Adding a many-to-many relation
$image = Image::load(123);
$image->tags[] = ['name' => 'Landscape'];
$image->broadcast();

foreach($image->tags as $tag) { // Echoes: 'Montain', 'Black&White', 'Landscape'
    echo $tag->name;
}

Documentation

See the whole documentation here., (*6)

Testing

The spec suite can be runned with:, (*7)

cd chaos
composer install
./bin/kahlan

The Versions

05/07 2018

dev-master

9999999-dev

Data Abstraction Layer.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm model datamapper data abstraction