aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-10-20 09:37:45 +0000
committermistic100 <mistic@piwigo.org>2013-10-20 09:37:45 +0000
commit3e9c75d2bb8db1b5ef60d5bbcf6c9d76fe7610b7 (patch)
treea71734f6585fa25d67b92ab1746bcab7a91e0dee /include
parent4926fced5e18cc5ea71f3c32e695649230667efb (diff)
add "abstract" keyword for API base classes + PwgRestRequestHandler inherits from PwgRequestHandler
git-svn-id: http://piwigo.org/svn/trunk@25025 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/ws_core.inc.php10
-rw-r--r--include/ws_protocols/rest_handler.php2
2 files changed, 6 insertions, 6 deletions
diff --git a/include/ws_core.inc.php b/include/ws_core.inc.php
index 39720baa1..933b2ba57 100644
--- a/include/ws_core.inc.php
+++ b/include/ws_core.inc.php
@@ -136,28 +136,28 @@ class PwgNamedStruct
/**
* Abstract base class for request handlers.
*/
-class PwgRequestHandler
+abstract class PwgRequestHandler
{
/** Virtual abstract method. Decodes the request (GET or POST) handles the
* method invocation as well as response sending.
*/
- function handleRequest(&$server) { assert(false); }
+ abstract function handleRequest(&$service);
}
/**
*
* Base class for web service response encoder.
*/
-class PwgResponseEncoder
+abstract class PwgResponseEncoder
{
/** encodes the web service response to the appropriate output format
* @param response mixed the unencoded result of a service method call
*/
- function encodeResponse($response) { assert(false); }
+ abstract function encodeResponse($response);
/** default "Content-Type" http header for this kind of response format
*/
- function getContentType() { assert(false); }
+ abstract function getContentType();
/**
* returns true if the parameter is a 'struct' (php array type whose keys are
diff --git a/include/ws_protocols/rest_handler.php b/include/ws_protocols/rest_handler.php
index b00987e02..888dac15e 100644
--- a/include/ws_protocols/rest_handler.php
+++ b/include/ws_protocols/rest_handler.php
@@ -21,7 +21,7 @@
// | USA. |
// +-----------------------------------------------------------------------+
-class PwgRestRequestHandler
+class PwgRestRequestHandler extends PwgRequestHandler
{
function handleRequest(&$service)
{