2017 © Pedro Peláez
 

library paris

A lightweight Active Record implementation for PHP5, built on top of Idiorm

image

voku/paris

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  • Sunday, October 8, 2017
  • by voku
  • Repository
  • 3 Watchers
  • 7 Stars
  • 7,066 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 147 Forks
  • 0 Open issues
  • 31 Versions
  • 0 % Grown

The README.md

Build Status codecov.io Codacy Badge SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version PHP 7 ready License, (*1)

Paris

http://j4mie.github.com/idiormandparis/, (*2)

WARNING: this is only a Maintained-Fork from: "https://github.com/j4mie/paris/", (*3)

INFO: you can use my Simple Active Record lib instad of Paris: "https://github.com/voku/simple-active-record", (*4)


Installation

The recommended installation way is through Composer., (*5)

$ composer require voku/paris

A lightweight Active Record implementation for PHP5., (*6)

Built on top of Idiorm., (*7)

Tested on PHP 5.3+ - may work on earlier versions with PDO and the correct database drivers., (*8)

Released under a BSD license., (*9)

Features

  • Extremely simple configuration.
  • Exposes the full power of Idiorm's fluent query API.
  • Supports associations.
  • Simple mechanism to encapsulate common queries in filter methods.
  • Built on top of PDO.
  • Uses prepared statements throughout to protect against SQL injection attacks.
  • Database agnostic. Currently supports SQLite, MySQL, Firebird and PostgreSQL. May support others, please give it a try!
  • Supports collections of models with method chaining to filter or apply actions to multiple results at once.
  • Multiple connections are supported

Documentation

The documentation is hosted on Read the Docs: paris.rtfd.org, (*10)

Building the Docs

You will need to install Sphinx and then in the docs folder run:, (*11)

make html

The documentation will now be in docs/_build/html/index.html, (*12)

Let's See Some Code

/**
 * User: a sample user-class
 *
 * @property-read int    $id
 * @property-read string $first_name
 */
class User extends Model {
  public function tweets() {
      return $this->has_many('Tweet');
  }

  public function getId()
  {
    return $this->id;
  }

  public function getFirstName()
  {
    return $this->first_name
  }
}

/**
 * Tweet: a sample twitter-class
 *
 * @property-read int    $id
 * @property-read string $text
 */
class Tweet extends Model {

}

$user = Model::factory('User')
  ->where_equal('username', 'j4mie')
    ->find_one();
$user->first_name = 'Jamie';
$user->save();

$tweets = $user->tweets()->find_many();
foreach ($tweets as $tweet) {
  echo $tweet->text;
}

The Versions

08/10 2017

dev-master

9999999-dev http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

The Development Requires

orm model active record paris

10/08 2017

v1.7.6

1.7.6.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

The Development Requires

orm model active record paris

21/03 2017

v1.5.6

1.5.6.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

The Development Requires

orm model active record paris

09/03 2017

v1.7.5

1.7.5.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

24/01 2017

dev-analysis-qg5rG5

dev-analysis-qg5rG5 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

14/12 2016

v1.5.5

1.5.5.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

The Development Requires

orm model active record paris

30/06 2016

v1.7.4

1.7.4.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

05/05 2016

v1.7.3

1.7.3.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

26/04 2016

v1.7.2

1.7.2.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

03/12 2015

v1.7.1

1.7.1.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

02/12 2015

v1.7.0

1.7.0.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

23/10 2015

v1.6.7

1.6.7.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

16/10 2015

v1.6.6

1.6.6.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

02/09 2015

v1.6.5

1.6.5.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm model active record paris

19/08 2015

v1.6.3

1.6.3.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD

The Requires

 

The Development Requires

orm model active record paris

19/08 2015

v1.6.4

1.6.4.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD

The Requires

 

The Development Requires

orm model active record paris

19/08 2015

dev-analysis-8mnMYX

dev-analysis-8mnMYX http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD

The Requires

 

The Development Requires

orm model active record paris

13/08 2015

v1.6.2

1.6.2.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD

The Requires

 

The Development Requires

orm model active record paris

03/08 2015

v1.6.1

1.6.1.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD

The Requires

 

The Development Requires

orm model active record paris

02/08 2015

v1.6.0

1.6.0.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD

The Requires

 

The Development Requires

orm model active record paris

23/09 2014

dev-develop

dev-develop http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

23/09 2014

v1.5.4

1.5.4.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

25/06 2014

v1.5.3

1.5.3.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

23/06 2014

v1.5.2

1.5.2.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

22/06 2014

v1.5.1

1.5.1.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

22/06 2014

v1.5.0

1.5.0.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

12/12 2013

v1.4.2

1.4.2.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

05/09 2013

v1.4.1

1.4.1.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

05/09 2013

v1.4.0

1.4.0.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

31/01 2013

v1.3.0

1.3.0.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris

14/11 2012

v1.2.0

1.2.0.0 http://j4mie.github.com/idiormandparis

A lightweight Active Record implementation for PHP5, built on top of Idiorm

  Sources   Download

BSD-2-Clause BSD-4-Clause BSD-3-Clause

The Requires

 

orm model active record paris