Tuesday, August 20, 2013

Re: 3.0: a peek into CakePHP's future

PROBLEM:
After finally learning the Events system, I found myself wishing for a sub-event binding & triggering scheme.

If I have some callbacks bound on "Order.change" and some on "Order.addProduct", I have to create and trigger two separate events and results for the same functionality.

IDEA:
Dispatched event "Order.change:addProduct,updateShipment"
triggers callbacks which are bound to events:
- "Order.change"
- "Order.change:addProduct"
- "Order.change:updateShipment"
- "Order.change:updateShipment,addProduct"

Something similar to scope resolution in CakeLog.

I would love to have (or write) that in Cake3.0!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: