fguillot/picoFeed — pull request #62 by Raydiation (2014-11-04 10:59:29+00:00)
Title: Package + Exceptions restructuring

Quite a few Changes but its the refactoring branch anyways :)

* All Exceptions have an Exception added to them (e.g. InvalidUrl -> InvalidUrlException) since you need namespaces to import them and its a convention
* All Exceptions inherit from PicoFeedException so you can only catch that Exception if you want to. This makes it easier to detect exceptions that were not yet handled in the lib so we can patch it
* There is no ParserException but a subclass called MalformedXmlException, ParserException is the baseclass so you can specialize it further in the future. The same was done for ClientException and ReaderException
* TimeoutException was added because it may be good to know that the feed timed out so you may want to modifiy the timeout setting
* I've fixed some unit tests
* Unit tests now have folders too and use namespaces, so its easier to import
* Unit tests use relative imports for the autoloader
* Exceptions were moved into their corresponding packages where they can occur, so MalformedXmlException is now in PicoFeed\Parser\MalformedXmlException
* Writer, Client, Reader and Parser are now in the proper namespaces, namely Client\ Reader\ and Parser\. You'll see that there are now way less imports which adds to cohesion
* Writer is now called Syndication (=Publishing)
* Import and Export are now in Serialization
* Logging and Config have a separate folder and namespace

Documentation is not yet up to date though, but thats still a todo for the refactoring branch anyways