PHP Object Framework (PHPOF)

This page is about PHPOF2. For the original PHPOF (version 1), see the PHPOF1 pages.

What is PHPOF?

PHPOF is an object-oriented database access layer for PHP 5. It performs object-relational mapping (ORM) to make using SQL databases easier and more intuitive in PHP. Like this:

mysql> create table widgets(id int unsigned primary key auto_increment, name varchar(20) not null, description text, image blob, image_mime_type varchar(20));
require_once 'PHPOF2/DB.php';
require_once 'PHPOF2/DBTable.php';

$DB = PHPOF2_DB::factory('mysqli://foo:password@foohost/somedb');
$widgets = new PHPOF2_DBTable($DB, 'widgets');
$widget = $widgets->createRowObject();

$widget->name = 'foo';
$widget->description = 'Some long text';


Key features