CustomBaseBehavior
, (*1)
License
MIT License, (*2)
copyright (c) 2012 Charles Sanquer, (*3)
Functionality
Propel Behavior to customize generated Parent Base classes, (*4)
The normal propel inheritance with generated base classes follow this schema :, (*5)
, (*6)
With CustomBaseBehavior you can change the parent classes of the base generated classes and share common methods between model objects, (*7)
, (*8)
Requirements
This behavior requires Propel >=1.6.0, (*9)
Installation
You can use composer and packagist.org package csanquer/custom-base-behavior, (*10)
Or just download and copy the behavior to a specific path., (*11)
Then register the behavior class by adding the following to the bottom of the build.properties
file in you project folder:, (*12)
# check that you have behaviors enabled
propel.builder.addBehaviors = true
# and add the custom behavior
propel.behavior.custom_base.class = path.to.CustomBehavior
Enable the behavior in your schema.xml:, (*13)
Base classes can use namespaces ( with \, / or dot character)., (*14)
Your custom Base Object class should extend Propel BaseObject and your custom Base Query class should extend Propel ModelCriteria., (*15)
Tests
To run tests, (*16)
curl -s http://getcomposer.org/installer | php
php composer.phar --dev install
phpunit