safrazik / breeze.server.php

Breeze JS support for PHP applications
MIT License
29 stars 11 forks source link

Triggering Events? #24

Open aronduby opened 8 years ago

aronduby commented 8 years ago

I'm considering using this for an upcoming project, but there's one last thing I'm not seeing how to do using this library and breeze that I'm hopeful someone can shed some light on. I need a way to be able to trigger an event in php from breeze. I'm all set with using the events on the back-end, I just don't see a way to get them to run from the front-end.

Probably the best example I can give is a tournament. Once all of the matches for a round are done I'd show the user a button to progress to the next round, which would send a request to the server to do all the work of figuring out the matches and then respond with the next round.

Ideally on the front-end I could have a progress method on the tournament entity, and calling that would trigger a Symfony event somehow.

Any ideas on how something like this can be accomplished?