http://j4mie.github.com/idiormandparis/
A lightweight Active Record implementation for PHP5.
Built on top of Idiorm.
Tested on PHP 5.2.0+ - may work on earlier versions with PDO and the correct database drivers.
Released under a BSD license.
- 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
The documentation is hosted on Read the Docs: paris.rtfd.org
You will need to install Sphinx and then in the docs folder run:
make html
The documentation will now be in docs/_build/html/index.html
class User extends Model {
public function tweets() {
return $this->has_many('Tweet');
}
}
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;
}
- Documentation moved to paris.rtfd.org and now built using Sphinx
- Add support for multiple database connections - closes issue #15 [tag]
- Allow a prefix for model class names - see Configuration in the documentation - closes issues #33
- Exclude tests and git files from git exports (used by composer)
- Implement
set_expr
- closes issue #39 - Add
is_new
- closes issue #40 - Add support for the new IdiormResultSet object in Idiorm - closes issue #14
- Change Composer to use a classmap so that autoloading is better supported [javierd] - issue #44
- Move tests into PHPUnit to match Idiorm
- Update included Idiorm version for tests
- Move documentation to use Sphinx
- Setup composer for installation via packagist (j4mie/paris)
- Add in basic namespace support, see issue #20
- Allow properties to be set as an associative array in
set()
, see issue #13 - Patch in idiorm now allows empty models to be saved (j4mie/idiorm see issue #58)
- Fix incorrect tests, see issue #12
- Add
is_dirty
method
- Initial release