sfPropelPlugin - 1.3.0

sfPropelPlugin adds support for Propel 1.3 for symfony 1.1.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source | Show as Markdown

sfPropelPlugin (Propel 1.3 for symfony 1.1)

The sfPropelPlugin is a symfony plugin that provides integration with Propel. Propel is an Object-Relational Mapping (ORM) framework. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data. The plugin provides a model layer for symfony with tasks for managing the object model and generators for creating crud/admin modules.

Propel allows you, the web application developer, to work with databases in the same way you work with other classes and objects in PHP.

* You don't have to worry about database connections or writing SQL -- unless you want to.
* You never have to worry about escaping data or type-casting results.
* You define your database in a simple XML format (or tell Propel to build it from an existing database) and Propel will create database initialization files for your database and will generate static classes and objects that provide an OO interface to your database. (It can generate other useful things based on the datamodel too!)
* Propel builds classes which are aware of the structure of your database so there's no performance lost to initialization or to on-the-fly database metadata queries.

Installation

  • Install the plugin

    symfony plugin:install sfPropelPlugin

  • Configure databases.yml and propel.ini

config/databases.yml (copy from sfPropelPlugin/config/databases.yml.example)

dev:
  propel:
    param:
      classname:  DebugPDO

all:
  propel:
    class:        sfPropelDatabase
    param:
      classname:  PropelPDO
      dsn:        mysql:dbname=foobar;host=localhost
      username:   foo
      password:   bar
      encoding:   utf8
      persistent: true
      pooling:    true

config/propel.ini (copy from sfPropelPlugin/config/propel.ini.example)

propel.database.driver     = mysql
propel.database.url        = mysql:dbname=foobar;host=localhost
propel.database.creole.url = ${propel.database.url}
propel.database.user       = foo
propel.database.password   = bar
propel.output.dir          = /path/to/project
  • Clear you cache

    symfony cc

  • Rebuild your object model

    symfony propel:build-all

  • Clear you cache

    symfony cc

Documentation

If upgrading see:

TODO

  • Add master/slave support for config
  • Add query timing + better logging

Changelog

1.3.0-PRE

  • dwhittle: initial release