Thursday, December 4, 2008

Need help with model class extensions + behavior

Hello

app\App_Model.php
<?php
class AppModel extends Model {
var $actAs = array("My");
function beforeSave() { }
}
?>

app\models\behaviors\My.php
<?php
class MyBehavior extends ModelBehavior {
function beforeSave() { }
}
?>

app\models\Track.php
<?php
class TrackModel extends AppModel {
function beforeSave() { }
}
?>

i'm looking for a smart way to
- execute the AppModel's beforeSave()
then
- execute the TrackModel's beforeSave()
and last
- execute the MyBehavior's beforeSave()

i tried with parent::beforeSave() but i can't get it to work

Any help/hint is appreciated


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: