What is a technique in MVC that can be used to trigger updates?Namely,When user clicks a button save a product I have this:function saveProduct($product){    $this->repository->saveProduct($product);}But addition of (any) product must trigger a global state update.  I did it like so:function saveProduct($product){    $this->repository->saveProduct($product);    $this->repository->updateGlobalState();}But then I end up with updateGlobalState code in every method.. i.e:function saveMotor($motor){    $this->repository->saveMotor($motor);    $this->repository->updateGlobalState();}Is there a way to not clutter specific methods but to somehow trigger global state update in a different way so that methods are clutter-free?
How to trigger other events in MVC, once the desired event completes?
object oriented;php;mvc;event programming