You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
gbili e6ea6a5add fix: remove sensitive data 5 years ago
config fix: remove sensitive data 5 years ago
log allow api methods whitelisting 7 years ago
src/Webservice feat: start session only once 5 years ago
templates created mocks for testing 7 years ago
tests/Webservice BSR -> Bsr 7 years ago
.gitattributes ensure that line endings are always LF 11 years ago
.gitignore included composer.lock in gitignore 7 years ago
CHANGELOG.md using composer package format, decoupling bsr libraries and implementation 7 years ago
CONTRIBUTING.md using composer package format, decoupling bsr libraries and implementation 7 years ago
LICENSE.md using composer package format, decoupling bsr libraries and implementation 7 years ago
README.md added some basic description 7 years ago
composer.json requiring dev-master everywhere 7 years ago
composer.lock included composer.lock in gitignore 7 years ago
flow.txt created mocks for testing 7 years ago
phpunit.xml added tests and removed logger from package 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.