承接 crysalead/chaos-orm 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

crysalead/chaos-orm

Composer 安装命令:

composer require crysalead/chaos-orm

包简介

Data Abstraction Layer.

README 文档

README

Build Status Build Status Scrutinizer Coverage Status

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.

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.

Available datasources libraries:

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).

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.

Testing

The spec suite can be runned with:

cd chaos
composer install
./bin/kahlan

统计信息

  • 总下载量: 11.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-20