php - Symfony2 - print message on non-console event -
i've started refactor 1 of commands in symfony2 (2.7) application. quick question - is there way write event listener listens custom event , handles printing message on screen?
suppose there class emits event, example, on successful save db. need listen event , when it's emitted, want print message on screen: "your entity has been saved successfully" , don't want in command code because in opinion when there many outputs in commands, execute
method becomes bit messy. that's why started search way of handling system events proper information user.
thanks!
maybe should try consolelogger ?
Comments
Post a Comment