Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (51 sloc) 2.16 KB

Propel Configuration

You can add a app/config/propel.ini file in your project to specify some configuration parameters. See the Build properties Reference to get more information.

By default the PropelBundle is configured with the default parameters:

# Enable full use of the DateTime class.
# Setting this to true means that getter methods for date/time/timestamp
# columns will return a DateTime object when the default format is empty.
propel.useDateTimeClass = true

# Specify a custom DateTime subclass that you wish to have Propel use
# for temporal values.
propel.dateTimeClass = DateTime

# These are the default formats that will be used when fetching values from
# temporal columns in Propel. You can always specify these when calling the
# methods directly, but for methods like getByName() it is nice to change
# the defaults.
# To have these methods return DateTime objects instead, you should set these
# to empty values
propel.defaultTimeStampFormat =
propel.defaultTimeFormat =
propel.defaultDateFormat =

# A better Pluralizer
propel.builder.pluralizer.class = builder.util.StandardEnglishPluralizer

Build properties

You can define build properties by creating a propel.ini file in app/config like below, but you can also follow the Symfony2 convention by adding build properties in app/config/config.yml:

# app/config/config.yml
        xxxxx.xxxx.xxxxx:   XXXX
        xxxxx.xxxx.xxxxx:   XXXX
        // ...


You can register Propel behaviors using the following syntax:

# app/config/config.yml
        behavior_name: My\Bundle\Behavior\BehaviorClassName

If you rely on third party behaviors, most of them are autoloaded so you don't need to register them. But, for your own behaviors, you can either configure the autoloader to autoload them, or register them in this section (this is the recommended way when you namespace your behaviors).

Configure the bundle | Back to index | Write an XML Schema

Jump to Line
Something went wrong with that request. Please try again.