Task #242 — Throwing Exception on !method_exists in epOverload->__call is unnecessary
Attached to Project— EZPDO
Opened by Richard Vallée (richardvallee) - Friday, 30 Nov 2007, 10:31pm
| Bug Report | |
| Runtime API | |
| Unconfirmed | |
| No-one | |
| All |
| Medium | |
| Normal | |
| 1.1.x | |
| Undecided | |
|
This is a feature, not a bug. However it is in my opinion a limiting feature without merit so I am flagging it as a bug. I am using the magic __call function to create a bi-directional relationship between an ezpdo-mapped DataObject and a BusinessObject in order to separate data from logic. For this purpose I instantiate a BusinessObject in the ezpdo-mapped DataObject, passing the DataObject to the BusinessObject so it can have all the DO's data without violating data/logic encapsulation. I use the magic __call function on the DO to call the BO's functions. This allows me to instantiate DO using ezpdo, keep layer separation while still being able to call business logic on the BO through the DO. epOverload->__call however checks if method_exists in the ezpdo-mapped object, preventing any use of this pattern. Simply commenting lines 197-199 in epOverload enables this pattern to work perfectly without any side-effect. In my opinion the check for method_exists in the ezpdo-mapped object is pointless as it prevents the use of the magic __call function on mapped objects. |
This task depends upon
This task blocks these from closing
Comments (0) | Attachments (0) | Related Tasks (0/0) | Notifications (1) | Reminders (0) | History |