Propel is an open-source Object-Relational Mapping (ORM) for PHP5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data.
Propel gives you, the web application developer, the tools to work with databases in the same way you work with other classes and objects in PHP.
Propel makes database coding fun again.
<?php
$book = BookQuery::create()->findPK(123); // retrieve a record from a database
$book->setName('Don\'t be Hax0red!'); // modify. Don't worry about escaping
$book->save(); // persist the modification to the database
$books = BookQuery::create() // retrieve all books...
->filterByPublishYear(2009) // ... published in 2009
->orderByTitle() // ... ordered by title
->joinWith('Book.Author') // ... with their author
->find();
foreach($books as $book) {
echo $book->getAuthor()->getFullName();
}
Fork the Propel GitHub repository at github.com/propelorm/propel.
Propel uses PDO as an abstraction layer, and code generation to remove the burden of runtime introspection. Therefore Propel is fast.
Propel implements all the key concepts of mature ORM layers: the ActiveRecord pattern, validators, behaviors, table inheritance, reverse engineering an existing database, nested sets, nested transactions, lazy loading, LOB, you name it.
Propel is built for developers who need to keep control of their code:
Propel is released under the MIT license. It’s free to use, even in commercial applications.
Do you want to know more? Jump to the Documentation tab, or start exploring the code in the GitHub repository.
Propel is strongly unit tested. Propel is developed under Continuous Integration and with a Test Driven Development approach. You can look at the Propel CI server powered by Jenkins or look at the results below:
Propel 1.6 | Propel2 (unstable) | sfPropelORMPlugin | PropelBundle | PropelServiceProvider |
---|---|---|---|---|