Good PHP Orm Library

What is the easiest to use ORM framework for PHP?

Both CodeIgniter (http://codeigniter.com/user_guide/database/active_record.html) and its PHP5 only fork Kohana (http://docs.kohanaphp.com/libraries/orm) contain implementations of the ActiveRecord pattern.

Anyone know of a good PHP ORM that DOES NOT use PDO?

I suppose that every modern ORM relies on PDO as it's a standard database driver.

If you have MySQLi extension enabled then you should be able to write your own PDO (IIRC MySQLi supports everything that PDO does).

if (extension_loaded('pdo_mysql') == false) {
class PDO {
protected $connection;

public function __construct($dsn, $username = null, $password = null, array $driver_options = array()) {
$this->connection = new MySQLi(...);
}
}

class PDOStatement { ... }
class PDOException extends RuntimeException { ... }
}

You'll have to implement whole PDO API but at least it will works.

PHP ORM library based on the Data Mapper pattern

After a lot of searching, i found 2 Data Mapper ORM :

  • Xyster : really great, but developped by a couple of people, so I can't use it professionally (even though it seems really great)
  • Doctrine version 2 : will be integrated to Zend Framework 2, will support the Data Mapper pattern, and seems to be the best option ever with possibilities inspired by J2EE and Hibernate. Unfortunately, still in beta.

Note : Doctrine 1.0 is not based on the Data Mapper pattern but on Active Record, as Propel. These are not fullfilling my needs.

In conclusion, the answer, for now, is : there is none.

What's a good PHP Active Record library?

Are you explicitly looking for an implementation of the Active Record pattern?

If not you might want to look into an object-relational mapper (ORM), such as Doctrine or Propel. See also this question on SO.



Related Topics



Leave a reply



Submit