diff --git a/.README.md.swp b/.README.md.swp deleted file mode 100644 index 9817a7f..0000000 Binary files a/.README.md.swp and /dev/null differ diff --git a/README.md b/README.md index 5268aaa..f93d394 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,34 @@ # README # -This repository contains the code for the WebService used internally at the [BSR](http://bibliothequesonore.ch/) by the Drupal website and both the iOS and Android applications. +This repository contains the code for the WebService used internally at the +[BSR](http://bibliothequesonore.ch/) by the Drupal website and both the iOS +and Android applications. -For more information, please consult the internal documentation : http://192.168.1.250/dokuwiki/doku.php?id=webservice \ No newline at end of file +For more information, please consult the internal documentation : +http://192.168.1.250/dokuwiki/doku.php?id=webservice + +BSR Webservice +============== + +The webservice module contains a few classes that help implementing a webservice +by simply inheritting from the abstract \BSR\Webservice + +When you subclass \BSR\Webservice, you can instantiate and call run() from an http +reachable file, such as index.php. From there, \BSR\Webservice will try to respond +to the request that should contain a 'func'= paramter which represnts the +method being called by the webservice. You have to pass along the parameters of that +method. + +BSR Renderer +------------ +It uses a \BSR\Renderer to capture the buffer that will end up being returned as a +response. + +BSR Formatter +------------- +Before the response is returned, it can be formatterd in one of : HTML, Json, Xml +Text etc. + +For the moment the Formatter will always be of type Json, because it is hardcoded +into the getFormatterFromHeaders() method. So if you are interested in any other +formatter, modify that function.