Overview

Namespaces

  • None
  • PHP

Classes

  • RESTian
  • RESTian_Application_Json_Parser
  • RESTian_Application_Serialized_Php_Parser
  • RESTian_Application_Xml_Parser
  • RESTian_Auth_Provider_Base
  • RESTian_Base
  • RESTian_Basic_Http_Auth_Provider
  • RESTian_Client
  • RESTian_Http_Agent_Base
  • RESTian_Not_Applicable_Provider
  • RESTian_Parser_Base
  • RESTian_Php_Curl_Http_Agent
  • RESTian_Request
  • RESTian_Response
  • RESTian_Service
  • RESTian_Settings
  • RESTian_Text_Csv_Parser
  • RESTian_Text_Html_Parser
  • RESTian_Text_Plain_Parser
  • RESTian_Var
  • RESTian_WordPress_Http_Agent
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 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: 
API documentation generated by ApiGen 2.8.0