2017 © Pedro Peláez
 

library ornament

PHP5 ORM toolkit

image

monomelodies/ornament

PHP5 ORM toolkit

  • Monday, March 14, 2016
  • by monomelodies
  • Repository
  • 1 Watchers
  • 0 Stars
  • 179 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 38 Versions
  • 0 % Grown

The README.md

Ornament

PHP5 ORM toolkit, (*1)

ORM is a fickle beast. Many libraries (e.g. Propel, Doctrine, Eloquent etc) assume your database should correspond to your models. This is simply not the case; models contain business logic and may, may not or may in part refer to database tables, NoSQL databases, flat files, an external API or whatever. The point is: the models shouldn't care, and there should be no "conventional" mapping through their names. (A common example would be a model of pages in multiple languages, where the data might be stored in a page table and a page_i18n table for the language-specific data.), (*2)

Also, the use of extensive and/or complicated config files sucks. (XML? This is 2015, people!), (*3)

Installation

Add "monomelodies/ornament" to your composer.json requirements:, (*4)

$ composer require monomelodies/ornament

Manual installation

  1. Get the code;
    1. Clone the repository, e.g. from GitHub;
    2. Download the ZIP (e.g. from Github) and extract.
  2. Make your project recognize Ornament:
    1. Register /path/to/ornament/src for the namespace Ornament\\ in your PSR-4 autoloader (recommended);
    2. Alternatively, manually include the files you need.

Basic usage

Ornament models (or "entities" if you're used to Doctrine-speak) are really nothing more than vanilla PHP classes; there is no need to extend any base object of sorts (since you might want to do that in your own framework!)., (*5)

Ornament is a toolkit, so it supplies a number of Traits one can use to extend your models' behaviour beyond the ordinary., (*6)

The most basic implementation would look as follows:, (*7)

<?php

use Ornament\Model;
use Ornament\Adapter\Pdo;

class MyModel
{
    use Model;

    // Public properties on a Model are considered "handleable" by Ornament:
    public $id;
    public $name;
    public $value;

    public function __construct()
    {
        $this->addAdapter(new Pdo($GLOBALS['database']));
    }
}

The Versions

14/03 2016

dev-master

9999999-dev

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

14/03 2016

dev-develop

dev-develop

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

14/03 2016

0.8.3

0.8.3.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

11/03 2016

0.8.2

0.8.2.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

07/03 2016

0.8.1

0.8.1.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

21/02 2016

0.8.0

0.8.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

09/02 2016

0.7.1

0.7.1.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

09/02 2016

0.7.0

0.7.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

08/02 2016

0.6.16

0.6.16.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

07/02 2016

0.6.15

0.6.15.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

07/02 2016

0.6.14

0.6.14.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

07/02 2016

0.6.13

0.6.13.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

06/02 2016

0.6.12

0.6.12.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

10/01 2016

0.6.11

0.6.11.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

09/12 2015

0.6.10

0.6.10.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

22/11 2015

0.6.9

0.6.9.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

18/10 2015

0.6.8

0.6.8.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

18/10 2015

0.6.7

0.6.7.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

18/10 2015

0.6.6

0.6.6.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

17/10 2015

0.6.5

0.6.5.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

17/10 2015

0.6.4

0.6.4.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

17/10 2015

0.6.3

0.6.3.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

17/10 2015

0.6.2

0.6.2.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

17/10 2015

0.6.1

0.6.1.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

17/10 2015

0.6.0

0.6.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

16/10 2015

0.5.2

0.5.2.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

12/10 2015

0.5.1

0.5.1.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

11/10 2015

0.5.0

0.5.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

11/10 2015

0.4.2

0.4.2.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

11/10 2015

0.4.1

0.4.1.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

11/10 2015

0.4.0

0.4.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

10/10 2015

0.3.0

0.3.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

08/10 2015

0.2.0

0.2.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

04/10 2015

0.1.2

0.1.2.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

28/09 2015

0.1.1

0.1.1.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

27/09 2015

0.1.0

0.1.0.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

22/09 2015

0.0.2

0.0.2.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marijn Ophorst

orm php

24/08 2015

0.0.1

0.0.1.0

PHP5 ORM toolkit

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Marijn Ophorst

orm php