Changeset 25025


Ignore:
Timestamp:
10/20/13 11:37:45 (6 years ago)
Author:
mistic100
Message:

add "abstract" keyword for API base classes + PwgRestRequestHandler inherits from PwgRequestHandler

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_core.inc.php

    r23261 r25025  
    137137 * Abstract base class for request handlers. 
    138138 */ 
    139 class PwgRequestHandler 
     139abstract class PwgRequestHandler 
    140140{ 
    141141  /** Virtual abstract method. Decodes the request (GET or POST) handles the 
    142142   * method invocation as well as response sending. 
    143143   */ 
    144   function handleRequest(&$server) { assert(false); } 
     144  abstract function handleRequest(&$service); 
    145145} 
    146146 
     
    149149 * Base class for web service response encoder. 
    150150 */ 
    151 class PwgResponseEncoder 
     151abstract class PwgResponseEncoder 
    152152{ 
    153153  /** encodes the web service response to the appropriate output format 
    154154   * @param response mixed the unencoded result of a service method call 
    155155   */ 
    156   function encodeResponse($response) { assert(false); } 
     156  abstract function encodeResponse($response); 
    157157 
    158158  /** default "Content-Type" http header for this kind of response format 
    159159   */ 
    160   function getContentType() { assert(false); } 
     160  abstract function getContentType(); 
    161161 
    162162  /** 
  • trunk/include/ws_protocols/rest_handler.php

    r19703 r25025  
    2222// +-----------------------------------------------------------------------+ 
    2323 
    24 class PwgRestRequestHandler 
     24class PwgRestRequestHandler extends PwgRequestHandler 
    2525{ 
    2626  function handleRequest(&$service) 
Note: See TracChangeset for help on using the changeset viewer.