readme 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. sfPropelPlugin (Propel 1.3 for symfony 1.1)
  2. ===========================================
  3. The `sfPropelPlugin` is a symfony plugin that provides integration with [Propel](http://propel.phpdb.org/).
  4. Propel is an [Object-Relational Mapping (ORM)](http://en.wikipedia.org/wiki/Object-relational_mapping) framework.
  5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data.
  6. The plugin provides a model layer for symfony with tasks for managing the object model and generators for creating crud/admin modules.
  7. Propel allows you, the web application developer, to work with databases in the same way you work with other classes and objects in PHP.
  8. * You don't have to worry about database connections or writing SQL -- unless you want to.
  9. * You never have to worry about escaping data or type-casting results.
  10. * 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!)
  11. * 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.
  12. Installation
  13. ------------
  14. * Install the plugin
  15. symfony plugin:install sfPropelPlugin
  16. * Configure databases.yml and propel.ini
  17. config/databases.yml (copy from sfPropelPlugin/config/databases.yml.example)
  18. dev:
  19. propel:
  20. param:
  21. classname: DebugPDO
  22. all:
  23. propel:
  24. class: sfPropelDatabase
  25. param:
  26. classname: PropelPDO
  27. dsn: mysql:dbname=foobar;host=localhost
  28. username: foo
  29. password: bar
  30. encoding: utf8
  31. persistent: true
  32. pooling: true
  33. config/propel.ini (copy from sfPropelPlugin/config/propel.ini.example)
  34. propel.database.driver = mysql
  35. propel.database.url = mysql:dbname=foobar;host=localhost
  36. propel.database.creole.url = ${propel.database.url}
  37. propel.database.user = foo
  38. propel.database.password = bar
  39. propel.output.dir = /path/to/project
  40. * Clear you cache
  41. symfony cc
  42. * Rebuild your object model
  43. symfony propel:build-all
  44. * Clear you cache
  45. symfony cc
  46. Documentation
  47. -------------
  48. * [Upgrading from Propel 1.2 to 1.3](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/Upgrading)
  49. * [Propel Documentation](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3) + [User Guide](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/UserGuide)
  50. * The symfony book on: [model layer](http://www.symfony-project.org/book/1_1/08-Inside-the-Model-Layer), [generators](http://www.symfony-project.org/book/1_1/14-Generators), [i18n](http://www.symfony-project.org/book/1_1/13-I18n-and-L10n) - warning: based on propel 1.2 (but most is valid)
  51. * [Propel Tutorials](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/HowTos)
  52. * [Propel API Documentation](http://propel.phpdb.org/docs/api/1.3/runtime/)
  53. If upgrading see:
  54. * [Transaction syntax has changed in Propel 1.3](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/Upgrading#NewTransactionAPI)
  55. * [Out with RecordSet, in with Statements](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/Upgrading#NewPropelMethodSignatures)
  56. * [Custom SQL API has changed](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/Upgrading#GeneralDBAPIChanges)
  57. * [DateTime handling](http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/Upgrading#Much-ImprovedDateTimeHandling)
  58. TODO
  59. ----
  60. * Add master/slave support for config
  61. * Add query timing + better logging
  62. 1.3.0-PRE
  63. ---------
  64. * dwhittle: initial release