2017 © Pedro Peláez
 

orm storage

moss storage

image

moss/storage

moss storage

  • Monday, February 13, 2017
  • by potfur
  • Repository
  • 2 Watchers
  • 2 Stars
  • 171 Installations
  • PHP
  • 0 Dependents
  • 2 Suggesters
  • 3 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Moss Storage

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

Storage is a simple ORM developed for MOSS framework as completely independent library. In philosophy similar to Data Mapper pattern that allows moving data from object instances to database, while keeping them independent of each other., (*2)

Active Record brakes single responsibility principle (by extending some some base class), bloats entire design... and adds unnecessary coupling. Storage approaches this differently. Entities have no direct connection to database, business logic stays uninfluenced by repositories. The only connection between entities and database is in Storage itself - in models that describe how entities relate to repositories., (*3)

Two examples (assuming that corresponding model exists):, (*4)

$article = $storage->readOne('article')
    ->where('id', 123)
    ->with('comment', array(array('visible' => true)))
    ->execute();

This will read article entity with id=123 and with all its visible comments., (*5)

$obj = new Article('title', 'text');
$obj->comments = array(
    new Comment('It\'s so simple!', 'comment_author@mail'),
    new Comment('Yup, it is.', 'different_author@mail'),
);

$storage->write($obj)->with('comment')->execute();

This would write article entity into database with set comments., (*6)

For licence details see LICENCE.md Documentation is available in ./docs/, (*7)

Requirements

Just PHP >= 5.4, Doctrine DBAL and SQL database., (*8)

Installation

Download from github Or via Composer, (*9)

    "require": {
        "moss/storage": ">=0.9"
    }

Contribute

If you want to submit fix or some other enhancements, feel free to do so. Whenever you find a bug it would be nice if you submit it. And if you submit fix - this would be truly amazing!, (*10)

How to Contribute

  • Fork the Storage repository;
  • Create a new branch for each feature/improvement/issue;
  • Send a pull request from branch

Style Guide

All pull requests must adhere to the PSR-2 standard. All pull requests must be accompanied by passing PHPUnit tests., (*11)

The Versions

13/02 2017

dev-master

9999999-dev

moss storage

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michal Wachowski

orm database storage data mapper

23/02 2016

dev-dev

dev-dev

moss storage

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michal Wachowski

orm database storage data mapper

01/05 2014

v0.9.4

0.9.4.0

moss storage

  Sources   Download

MIT

The Requires

  • php >=5.3.4

 

The Development Requires

by Michal Wachowski

orm database storage data mapper

26/04 2014

v0.9.3-RC1

0.9.3.0-RC1

moss storage

  Sources   Download

MIT

The Requires

  • php >=5.3.4

 

The Development Requires

by Michal Wachowski

orm database storage data mapper