     1: <?php
     2:
     3: abstract class RESTian_Parser_Base {
     4:   var $request;
     5:   var $response;
     6:
     7:   /**
     8:    * @param RESTian_Request $request
     9:    * @param RESTian_Response $response
    10:    */
    11:   function __construct( $request, $response ) {
    12:     $this->request = $request;
    13:     $this->response = $response;
    14:   }
    15:   /**
    16:    * Used to throw an exception when not properly subclassed.
    17:    *
    18:    * @param string $body
    19:    * @return array|object
    20:    * @throws Exception
    21:    */
    22:   function parse( $body ) {
    23:     if (1)  // This logic here only to get PhpStorm to stop highlighting the return as an error.
    24:       throw new Exception( 'Class ' . get_class($this) . ' [subclass of ' . __CLASS__ . '] must define a parse() method.' );
    25:     return array();
    26:   }
    27: }
    28: