Doctrine ORM for PHP

Doctrine is a set of PHP libraries primarily focused on providing persistence services and related functionality. Object relational mapper (ORM) for PHP that sits on top of a powerful database abstraction layer (DBAL).

One of Doctrine’s key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL.

This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication

Usage demonstration

Entities in Doctrine 2 are lightweight PHP Objects that contain persistable properties. A persistable property is an instance variable of the entity that is saved into and retrieved from the database by Doctrine’s data mapping capabilities via the Entity Manager:

$user = new User();
$user->name = "Name";
$user->password = "Password";
echo "The user with id $user->id has been saved.";

Read previous post:

The issue: PHP has a new error level E_STRICT, since PHP 5.0. E_STRICT forces you to code clean PHP 5...