I’m reading “Yii 1.1 Application Development Cookbook” and i really don’t understand what did you make an event support in Yii? It just does only a simple task as javascript event - eventCall then it does only an explicit action.
If i raise an event "deleteCustomer", i want another module can catch this event.
i.e. I have 3 objects: Student, Teacher, Room.
I delete student A, then i raise event deleteStudentA in StudentController.
I want to send an email to the Teacher
I want to remove his name on the desk of the Room.
But… i don’t want to call sendEmail & removeHisName function in the “region” of Student (StudentController, StudentClass,…) .
I want to catch this event (and do something) in Teacher "region" & Room "region".
I am not sure that yii provides such event managment, allowing you to catch an event almost wherever.
The best for you is to use what is in already the framework, and not using feature other platforms has.
Yii is pretty straight forward and easy to learn, but only if you stick on the yii way of doing things.
For the task you described I see as only solution to manage it in the afterDelete of the model itself, of corse you are free to develop an event managment engine, but will be more productive just use the yii one, is already written.