geocoder-php/Geocoder — pull request #350 by willdurand (2014-10-07 14:12:58+00:00)
Title: [RFC] Refactoring for #345

Okay so I've started to hack on Geocoder v3, especially on #345.

* I'd like to remove class suffixes such as `Interface` or `Exception` when possible
* I'd like to return more meaningful exception messages
* I' d like to always return a set of `Address` objects, the new name of our `ResultInterface|Geocoded` objects. It is called `Address` to fit the XAL standard (also used by [Android](http://developer.android.com/reference/android/location/Address.html))
* I'd like to make immutable objects and a set of coherent classes for the results. I came across the following model: a result is an `Address` with `Coordinates`, `Bounds`, `County`, `Region`, and `Country` + some properties such as street name|number, city, timezone, etc.

This code is not working yet, but I'd like your feedback on it. Would it make sense to refactor the Result part that way? I mean, it won't be possible to override the factories anymore, but who uses that feature?
Also, it will create new objects for end users, and they'll have to deal with them. In another hand, it (hopefully) provides a stronger and better "model" layer.