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: class RESTian_Settings {
 4: 
 5:   /**
 6:    * @var string
 7:    */
 8:   var $settings_name;
 9: 
10:   /**
11:    * @var string HTTP Method
12:    */
13:   var $http_method;
14: 
15:   /**
16:    * @var string Content Type used on the Body of a POST or PUT
17:    */
18:   var $content_type;
19: 
20:   /**
21:    * @var string character set used
22:    */
23:   var $charset;
24: 
25:   function __construct( $settings_name, $args = array() ) {
26: 
27:     $this->modifier_name = $settings_name;
28: 
29:     if ( ! is_object( $args ) && ! is_array( $args ) ) {
30:       throw new Exception( 'Must pass a string, array or object for $args when creating a new ' . __CLASS__ . '.' );
31:     }
32: 
33:     $args = RESTian::expand_shortnames( $args, array(
34:       'method'  => 'http_method',
35:       'type'    => 'content_type',
36:     ));
37: 
38:     if ( isset( $args['content_type'] ) )
39:       $args['content_type'] = RESTian::expand_content_type( $args['content_type'] );
40: 
41:     /**
42:      * Copy properties in from $args, if they exist.
43:      */
44:     foreach( $args as $property => $value )
45:       if ( property_exists(  $this, $property ) )
46:         $this->$property = $value;
47: 
48:   }
49: 
50: }
51: 
API documentation generated by ApiGen 2.8.0