Hi guys, I'm writing a cli project with Phalcon.
I'm using websockets and made a common/library/Chat.php implementing Ratchet\MessageComponentInterface.
I'd like to save the messages I receive (and send) to my database (model is in common/models/Message.php). Where is the best place to do it ?
Directly in the library/Chat.php or in a Task ? And if it is in a Task, how do I call it from library/Chat.php ?