|
|
5 years ago | |
|---|---|---|
| config | 5 years ago | |
| log | 7 years ago | |
| src/Webservice | 5 years ago | |
| templates | 7 years ago | |
| tests/Webservice | 7 years ago | |
| .gitattributes | 11 years ago | |
| .gitignore | 7 years ago | |
| CHANGELOG.md | 7 years ago | |
| CONTRIBUTING.md | 7 years ago | |
| LICENSE.md | 7 years ago | |
| README.md | 7 years ago | |
| composer.json | 7 years ago | |
| composer.lock | 7 years ago | |
| flow.txt | 7 years ago | |
| phpunit.xml | 7 years ago | |
README.md
README
This repository contains the code for the WebService used internally at the BSR 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
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.