Jeroen De Dauw has submitted this change and it was merged. Change subject: Add docs to readme file ......................................................................
Add docs to readme file Change-Id: Ic5a9e37417dcf6c28ad7c12679463822df2ea5f9 --- M README.md 1 file changed, 37 insertions(+), 0 deletions(-) Approvals: Jeroen De Dauw: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/README.md b/README.md index 18977b7..ef7f651 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ Also contains various Exceptions and a few basic (de)serialization utilities. +## Requirements + +* PHP 5.3 or later + ## Installation You can use [Composer](http://getcomposer.org/) to download and install @@ -32,6 +36,39 @@ Load all dependencies and the load the Serialization library by including its entry point: Serialization.php. +## Usage + +### Library structure + +This component contains two sub parts, one containing serialization related code, the +other holding deserializaion specific code. The former is located in the Serializers +namespace, while the later resides in the Deserializers one. Both namespaces are PSR-0 +mapped onto the src directory. + +### Interfaces + +The primary thing provided by this library are the Serializer and Deserializer namespaces. +A set of Exceptions each process typically can encounter are also provided, and are located +in respective Exceptions namespaces. They all derive from (Des/S)erializationException. + +Both interfaces define two methods: a (de)serialize method that does the actual work, and +a can(Des/S)erialize method that allows finding out if a given (de)serializer can process +a given input. + +### Utilities + +A DispatchingSerializer and a DispatcingDeserializer are two generally usable implementations +of the interfaces that are included in this library. They both do the same thing: contain a +list of (de)serializers and dispatch calls to the (de)serialize method to the appropriate one. +This allows for bundling multiple (de)serializers together and enables handling of nested +data with variable structure. + +## Tests + +This library comes with a set up PHPUnit tests that cover all non-trivial code. You can run these +tests using the PHPUnit configuration file found in the root directory. The tests can also be run +via TravisCI, as a TravisCI configuration file is also provided in the root directory. + ## Release notes ### 1.0 -- To view, visit https://gerrit.wikimedia.org/r/73536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5a9e37417dcf6c28ad7c12679463822df2ea5f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Serialization Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <[email protected]> Gerrit-Reviewer: Jeroen De Dauw <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
