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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -