This pull request adds a callbacks registrar under the name CallbacksRegistrar which is a class responsible for registering and retrieving callbacks, it also offers some convenience methods such as the hasCallback and the hasProxy methods.
Thanks to this registrar, our GeoRoute class now has a single responsibility which is setting the geo rule.
The registrar will as well allow us to easily implement the default callback mechanism, i actually have wrote a draft code then deleted it deciding it would be better to add it in the next pull request not to make this a huge one.
This pull request adds a callbacks registrar under the name
CallbacksRegistrar
which is a class responsible for registering and retrieving callbacks, it also offers some convenience methods such as thehasCallback
and thehasProxy
methods.Thanks to this registrar, our
GeoRoute
class now has a single responsibility which is setting the geo rule.The registrar will as well allow us to easily implement the default callback mechanism, i actually have wrote a draft code then deleted it deciding it would be better to add it in the next pull request not to make this a huge one.