Home » Database » DB_DataObject » Bug #340
Feature Request: Events
Details
| Submitted | 2003-12-03 10:07 UTC |
|---|---|
| From | thomas at unifiedconsulting dot com |
| Status | Bogus |
| Package | DB_DataObject |
| PHP Version | 4.3.3 |
| OS | RHEL 3 |
| Roadmaps | (Not assigned) |
Comments
[2003-12-03 10:07 UTC] thomas at unifiedconsulting dot com
Description:
------------
It would be nice if you could define functions that would be executed before/after certain events (saving, loading, etc). For instance, I'd like to extend one of my dataobject classes to include some calculated fields that would be initialized whenever a function that loads a new record into the dataobject is called.
IMHO, the best way to do this would be to decide on some function names like afterLoad(), beforeSave(), etc, and then use method_exist() to check if these methods are defined. If they are, call them, and if not, just ignore them.