Skip to content

Latest commit

 

History

History
130 lines (93 loc) · 5.45 KB

index.markdown

File metadata and controls

130 lines (93 loc) · 5.45 KB
layout
home

{% capture contentLeft %}

Installation

Via Composer

"require": {
    "propel/propel": "~2.0@dev"
}

All releases at packagist.org: packagist.org/packages/propel/propel

All releases at github.com: github.com/propelorm/Propel2/releases

{% endcapture %}

{% capture contentBottom %}

Dive In!

What is Propel exactly?

Propel is an open-source Object-Relational Mapping (ORM) for SQL-Databases in PHP 5.5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data.

Additional to its ORM capabilities it does provide a query-builder, database schema migration, reverse engineering of existing database and much more.

Why Propel?

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 without writing SQL.

  • Propel is blazing fast
  • Query-Builder
  • IDE friendly thanks to code-generation
  • Generation of methods for all columns and relations
  • Database schema migration
  • Schema reverse engineering
  • Customizable
  • Well documented
  • Propel comes with common 'behaviors'

How?

You need to write the definition of your tables as xml, export it from your existing database through our 'database:reverse' command or build it via a tool like ORM-Designer.

<?xml version="1.0" encoding="UTF-8"?>
<database name="bookstore" defaultIdMethod="native">
  <table name="book" phpName="Book">
    <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
    <column name="title" type="varchar" size="255" required="true" />
    <column name="isbn" type="varchar" size="24" required="true" phpName="ISBN"/>
    <column name="author_id" type="integer" required="true"/>
    <foreign-key foreignTable="author">
      <reference local="author_id" foreign="id"/>
    </foreign-key>
  </table>
  <table name="author" phpName="Author">
    <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
    <column name="first_name" type="varchar" size="128" required="true"/>
    <column name="last_name" type="varchar" size="128" required="true"/>
  </table>
</database>

More details please!

It uses PDO as an abstraction layer and code generation to remove the burden of runtime introspection to achieve the fast execution time.

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:

  • Extensibility is at the heart of Propel's design; whatever you need to customize, Propel allows you to do so in a snap.
  • Propel can get out of your way for when you need custom queries or hyper-optimized transactions.
  • If you need to change your RDBMS in the course of the project, rebuild your model and you're ready to go. Propel supports MySQL, PostgreSQL, SQLite, MSSQL, and Oracle. First three are completely integrated in our test suite.
  • The code generated by Propel is well commented, IDE-friendly and easy to use.
  • The Propel project started in 2005 and already powers thousands of websites. Thoroughly documented, backed by many tutorials across the web, it also benefits from an enthusiast community that provides rapid support for both beginner and hardcore developers.

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.

{% endcapture %}

{% capture contentRight %}

Propel Build Status

Propel is strongly unit tested and is developed under Continuous Integration with a Test Driven Development approach.

We use Travis-CI to automatically build our projects, and here are the statuses of our master branches:

Propel 1.7
Propel2
sfPropelORMPlugin
PropelBundle
PropelServiceProvider

Propel2's code climate:

Code Climate

{% endcapture %}

{% include home.html %}