I am using the Phalcon micro application as my REST web service. I want to add an event to the application and fire this event from different places like controllers.
For example; if a user registers, the controller should fire a userRegistered
event, and userRegistered
should do some stuff.
How can I implement this?
interface IUsers
{
function onUserRegistered();
}
Event class
class UsersActivities implements IUsers
{
function onUserRegistered()
{
// TODO: Implement onUserRegistered() method.
}
}