Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.2
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (35 sloc) 2.151 kb

Documentation is available here.

What is FuzzyRecord?

FuzzyRecord is an Object-Relational-Mapping (ORM) system for PHP applications, based on the Active record design pattern, most famously used in Ruby On Rails. It has a friendly API leveraging some of the new features in PHP 5.3 behind the scenes.

What is FuzzyRecord not?

FuzzyRecord is NOT an MVC framework for PHP. It only provides a mechanism for storing an querying model objects (objects that store your application’s data).

Important note

FuzzyRecord should be considered a work in progress. Some features are incomplete, and it will contain bugs. The API is bound to change in some places in the future. Use at your own risk!

Requirements

  • PHP 5.3+ (Earlier versions are NOT supported)
  • PDO-MySQL and / or PDO-PGSQL
  • MySQL or PostgreSQL database server

Optional

  • Memcache PHP extension and server

Main features

  • Friendly Rails-like API (eg: $user→photos, User::find_by_email() etc)
  • Simple setup – many models will need no logic
  • Support for property validation (length, regex, email addresses etc)
  • File properties for storing files on a local disk
  • Handles relationships between objects, including cascade updates / deletes (currently one_to_many and belongs_to are supported)
  • Can be used with auto increment primary keys as well as non-integer and composite primary keys
  • Can cache model data in memory using a temporary store, and / or a persistent Memcached store
  • Explict or automatic transactions – rollback multiple actions accross the DB and cache stores
  • Can generate a DB schema from your models
  • Based on PDO for DB portability
  • Includes lots of unit tests

Coming soon

  • Better documentation
  • Write more tests
  • Many to many relationships without a joining table model
  • Full-text searching
  • Support for multiple find clauses with the same operator + field (eg: find_all_by_email_like_and_email_like())
  • Support for other databases (SQLite?)

Further future

  • DB-native foreign key constraints
  • Auto-generated admin system
Jump to Line
Something went wrong with that request. Please try again.