Middle Class Support
Propel Middle Class support is an experimental feature added in trunk in rev. 1081.
Middle classes allow you to place any custom class between a propel base class and the stub class. For example:
class BaseFoo ... class MiddleFoo extends BaseFoo class Foo extends MiddleFoo
Propel won't create MiddleFoo. Middle classes are meant to implement common, table specific, code. For example, you have two projects both with a Users table. You can add a custom MiddleUser with a checkPasswordExpired function and share the MiddleUser class between the projects. This would also be possible by configuring a custom base class. However, a middle class also allows you to overwrite the generated setPassword like this:
public function setPassword($value) {
parent::setPassword(md5($value) );
}
Middle classing can be added to a table by adding a middleClass attribute to schema.
<table name='Foo' middleClass='MiddleFoo'>
Remember, Propel won't build Foo.php again if it already exists!
