Commits

renren_platform committed 4272f7c

php sdk 2.0

Comments (0)

Files changed (17)

HttpRequestService.class.php

+<?php
+/*
+ * 调用远程RESTful的客户端类
+ * 要求最低的PHP版本是5.2.0,并且还要支持以下库:cURL, Libxml 2.6.0
+ * This class for invoke remote RESTful Webservice
+ * The requirement of PHP version is 5.2.0 or above, and support as below:
+ * cURL, Libxml 2.6.0
+ *
+ * @Version: 0.0.1 alpha
+ * @Created: 11:06:48 2010/11/23
+ * @Author:	Edison tsai<dnsing@gmail.com>
+ * @Blog:	http://www.timescode.com
+ * @Link:	http://www.dianboom.com
+ */
+
+ class HttpRequestService{
+  
+  #cURL Object
+	private $ch;
+  #Contains the last HTTP status code returned.
+	public $http_code;
+  #Contains the last API call.
+	private $http_url;
+  #Set up the API root URL.
+	public $api_url;
+  #Set timeout default.
+	public $timeout = 10;
+  #Set connect timeout.
+	public $connecttimeout = 30; 
+  #Verify SSL Cert.
+	public $ssl_verifypeer = false;
+  #Response format.
+	public $format = ''; // Only support json & xml for extension
+	public $decodeFormat = 'json'; //default is json
+	public $_encode         ='utf-8';
+  #Decode returned json data.
+	//public $decode_json = true;
+  #Contains the last HTTP headers returned.
+	public $http_info = array();
+	public $http_header = array();
+	private $contentType;
+	private $postFields;
+	private static $paramsOnUrlMethod = array('GET','DELETE');
+	private static $supportExtension  = array('json','xml');
+  #For tmpFile
+	private $file = null;
+  #Set the useragnet.
+	private static $userAgent = 'Timescode_RESTClient v0.0.1-alpha';
+
+
+	public function __construct(){
+
+		$this->ch = curl_init();
+		/* cURL settings */
+		curl_setopt($this->ch, CURLOPT_USERAGENT, self::$userAgent);
+		curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
+		curl_setopt($this->ch, CURLOPT_TIMEOUT, $this->timeout);
+		curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
+		curl_setopt($this->ch, CURLOPT_AUTOREFERER, TRUE);
+        curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);
+		curl_setopt($this->ch, CURLOPT_HTTPHEADER, array('Expect:'));
+		curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
+		curl_setopt($this->ch, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
+		curl_setopt($this->ch, CURLOPT_HEADER, FALSE);
+
+	}
+
+     /**
+      * Execute calls
+      * @param $url String
+      * @param $method String
+      * @param $postFields String 
+      * @param $username String
+      * @param $password String
+      * @param $contentType String 
+      * @return RESTClient
+      */
+	public function call($url,$method,$postFields=null,$username=null,$password=null,$contentType=null){
+		
+		if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0 && !empty($this->format)) {
+				$url = "{$this->api_url}{$url}.{$this->format}";
+			}
+
+		$this->http_url		= $url;
+		$this->contentType	= $contentType;
+		$this->postFields	= $postFields;
+
+		$url				= in_array($method, self::$paramsOnUrlMethod) ? $this->to_url() : $this->get_http_url();
+
+		is_object($this->ch) or $this->__construct();
+
+		switch ($method) {
+		  case 'POST':
+			curl_setopt($this->ch, CURLOPT_POST, TRUE);
+			if ($this->postFields != null) {
+			  curl_setopt($this->ch, CURLOPT_POSTFIELDS, $this->postFields);
+			}
+			break;
+		  case 'DELETE':
+			curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
+			break;
+		  case 'PUT':
+			curl_setopt($this->ch, CURLOPT_PUT, TRUE);
+			if ($this->postFields != null) {
+				$this->file = tmpFile();
+				fwrite($this->file, $this->postFields);
+				fseek($this->file, 0);
+			  curl_setopt($this->ch, CURLOPT_INFILE,$this->file);
+			  curl_setopt($this->ch, CURLOPT_INFILESIZE,strlen($this->postFields));
+			}
+			break;
+		}
+
+		$this->setAuthorizeInfo($username, $password);
+		$this->contentType != null && curl_setopt($this->ch, CURLOPT_HTTPHEADER, array('Content-type:'.$this->contentType));
+
+		curl_setopt($this->ch, CURLOPT_URL, $url);
+
+		$response = curl_exec($this->ch);
+		$this->http_code = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
+		$this->http_info = array_merge($this->http_info, curl_getinfo($this->ch));
+
+		$this->close();
+
+		return $response;
+	}
+	public function call_fopen($url,$method,$postFields=null,$username=null,$password=null,$contentType=null){
+		
+		if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0 && !empty($this->format)) {
+				$url = "{$this->api_url}{$url}.{$this->format}";
+			}
+
+		$this->http_url		= $url;
+		$this->contentType	= $contentType;
+		$this->postFields	= $postFields;
+
+		$url				= in_array($method, self::$paramsOnUrlMethod) ? $this->to_url() : $this->get_http_url();
+		$params = array('http' => array(
+			   'method' => 'POST',
+			   'header' => 'Content-type: application/x-www-form-urlencoded'."\r\n",
+			   'content' => $this->create_post_body($this->postFields)
+			));
+	   $ctx = stream_context_create($params);
+	   $fp = fopen($url, 'rb', false, $ctx);
+
+	   if (!$fp) {
+		  die ("can not open server!");
+	   }
+
+	   $response = @stream_get_contents($fp);
+	   if ($response === false) {
+		   die ("can not get message form server!");
+		  //throw new Exception("Problem reading data from {$url}, {$php_errormsg}");
+	   }
+	   return $response;
+	}
+	
+	 public function setEncode($encode){
+		!empty($encode) and $this->_encode = $encode;
+		return $this;
+	}
+	 public static function convertEncoding($source, $in, $out){
+		$in	= strtoupper($in);
+		$out = strtoupper($out);
+		if ($in == "UTF8"){
+			$in = "UTF-8";
+		}
+		if ($out == "UTF8"){
+			$out = "UTF-8";
+		}
+		if( $in==$out ){
+			return $source;
+		}
+	
+		if(function_exists('mb_convert_encoding')) {
+			return mb_convert_encoding($source, $out, $in );
+		}elseif (function_exists('iconv'))  {
+			return iconv($in,$out."//IGNORE", $source);
+		}
+		return $source;
+	}
+	/**
+      * POST wrapper,不基于curl函数,环境可以不支持curl函数
+      * @param method String
+      * @param parameters Array
+      * @return mixed
+      */
+	public function do_post_request($url, $postdata, $files)
+	{
+		$data = "";
+		$boundary = "---------------------".substr(md5(rand(0,32000)), 0, 10);
+
+		//Collect Postdata
+		foreach($postdata as $key => $val)
+		{
+			$data .= "--$boundary\r\n";
+			$data .= "Content-Disposition: form-data; name=\"".$key."\"\r\n\r\n".$val."\r\n";
+		}
+		$data .= "--$boundary\r\n";
+
+		//Collect Filedata
+		foreach($files as $key => $file)
+		{
+			$fileContents = file_get_contents($file['tmp_name']);
+			$data .= "Content-Disposition: form-data; name=\"{$key}\"; filename=\"{$file['name']}\"\r\n";
+			$data .= "Content-Type: ".$file['type']."\r\n";
+			$data .= "Content-Transfer-Encoding: binary\r\n\r\n";
+			$data .= $fileContents."\r\n";
+			$data .= "--$boundary--\r\n";
+		}
+
+		$params = array('http' => array(
+			   'method' => 'POST',
+			   'header' => 'Content-Type: multipart/form-data; boundary='.$boundary,
+			   'content' => $data
+			));
+
+
+	   $ctx = stream_context_create($params);
+	   $fp = fopen($url, 'rb', false, $ctx);
+
+	   if (!$fp) {
+		  die ("can not open server!");
+	   }
+
+	   $response = @stream_get_contents($fp);
+	   if ($response === false) {
+		   die ("can not get message form server!");
+		  //throw new Exception("Problem reading data from {$url}, {$php_errormsg}");
+	   }
+	   return $response;
+	}
+     /**
+      * POST wrapper for insert data
+      * @param $url String
+      * @param $params mixed 
+      * @param $username String
+      * @param $password String
+      * @param $contentType String
+      * @return RESTClient
+      */
+     public function _POST($url,$params=null,$username=null,$password=null,$contentType=null) {
+         $response = $this->call($url,'POST',$params,$username,$password,$contentType);
+		 //$this->convertEncoding($response,'utf-8',$this->_encode)
+		 return $this->json_foreach($this->parseResponse($response));
+     }
+	
+	public function _POST_FOPEN($url,$params=null,$username=null,$password=null,$contentType=null) {
+         $response = $this->call_fopen($url,'POST',$params,$username,$password,$contentType);
+		 return $this->json_foreach($this->parseResponse($response));
+     }
+	 public function _photoUpload($url, $postdata, $files) {
+         $response = $this->do_post_request($url, $postdata, $files);
+		 return $this->json_foreach($this->parseResponse($response));
+     }
+	 //将stdclass object转换成数组,并转换编码
+	 public function json_foreach($jsonArr)
+	 {
+		 if(is_object($jsonArr))
+		 {
+			 $jsonArr=get_object_vars($jsonArr);
+		 }
+			foreach($jsonArr AS $k=>$v){
+			if(is_array($v))
+			{
+				$jsonArr[$k]=$this->json_foreach($v);
+			}
+			elseif(is_object($v))
+			{
+				$v=get_object_vars($v);
+				$jsonArr[$k]=$this->json_foreach($v);
+			}
+			else
+			{
+				$v=$this->convertEncoding($v,"utf-8",$this->_encode);
+				$jsonArr[$k]=$v;
+			}
+			
+		}
+		return $jsonArr;
+	 }
+     /**
+      * PUT wrapper for update data
+      * @param $url String
+      * @param $params mixed 
+      * @param $username String
+      * @param $password String
+      * @param $contentType String
+      * @return RESTClient
+      */
+     public function _PUT($url,$params=null,$username=null,$password=null,$contentType=null) {
+         $response = $this->call($url,'PUT',$params,$username,$password,$contentType);
+		 return $this->parseResponse($this->convertEncoding($response,'utf-8',$this->_encode));
+     }
+	 public function create_post_body($post_params) {
+		$params = array();
+		foreach ($post_params as $key => &$val) {
+			if(is_array($val)) 
+			{
+				$val = implode(',', $val);
+			}
+			$params[] = $key.'='.urlencode($val);
+		}
+		return implode('&', $params);
+	}
+     /**
+      * GET wrapper for get data
+      * @param $url String
+      * @param $params mixed
+      * @param $username String
+      * @param $password String
+      * @return RESTClient
+      */
+     public function _GET($url,$params=null,$username=null,$password=null) {
+         $response = $this->call($url,'GET',$params,$username,$password);
+		 return $this->parseResponse($response);
+     }
+
+     /**
+      * DELETE wrapper for delete data
+      * @param $url String
+      * @param $params mixed
+      * @param $username String
+      * @param $password String
+      * @return RESTClient
+      */
+     public function _DELETE($url,$params=null,$username=null,$password=null) {
+		 #Modified by Edison tsai on 09:50 2010/11/26 for missing part
+		 $response = $this->call($url,'DELETE',$params,$username,$password);
+		 return $this->parseResponse($response);
+     }
+
+	 /*
+	 * Parse response, including json, xml, plain text
+	 * @param $resp String
+	 * @param $ext	String, including json/xml
+	 * @return String
+	 */
+	 public function parseResponse($resp,$ext=''){
+		
+		$ext = !in_array($ext, self::$supportExtension) ? $this->decodeFormat : $ext;
+		
+		switch($ext){
+				case 'json':
+					$resp = json_decode($resp);break;
+				case 'xml':
+					$resp = self::xml_decode($resp);break;
+		}
+			return $resp;
+	 }
+
+	 /*
+	 * XML decode
+	 * @param $data String
+	 * @param $toArray boolean, true for make it be array
+	 * @return String
+	 */
+	  public static function xml_decode($data,$toArray=false){
+		  /* TODO: What to do with 'toArray'? Just write it as you need. */
+			$data = simplexml_load_string($data);
+			return $data;
+	  }
+
+	  public static function objectToArray($obj){
+			
+	  }
+
+	   /**
+	   * parses the url and rebuilds it to be
+	   * scheme://host/path
+	   */
+	  public function get_http_url() {
+		$parts = parse_url($this->http_url);
+
+		$port = @$parts['port'];
+		$scheme = $parts['scheme'];
+		$host = $parts['host'];
+		$path = @$parts['path'];
+
+		$port or $port = ($scheme == 'https') ? '443' : '80';
+
+		if (($scheme == 'https' && $port != '443')
+			|| ($scheme == 'http' && $port != '80')) {
+		  $host = "$host:$port";
+		}
+		return "$scheme://$host$path";
+	  }
+
+	  /**
+	   * builds a url usable for a GET request
+	   */
+	  public function to_url() {
+		$post_data = $this->to_postdata();
+		$out = $this->get_http_url();
+		if ($post_data) {
+		  $out .= '?'.$post_data;
+		}
+		return $out;
+	  }
+
+	  /**
+	   * builds the data one would send in a POST request
+	   */
+	  public function to_postdata() {
+		return http_build_query($this->postFields);
+	  }
+
+     /**
+      * Settings that won't follow redirects
+      * @return RESTClient
+      */
+     public function setNotFollow() {
+         curl_setopt($this->ch,CURLOPT_AUTOREFERER,FALSE);
+         curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION,FALSE);
+         return $this;
+     }
+
+     /**
+      * Closes the connection and release resources
+      * @return void
+      */
+     public function close() {
+         curl_close($this->ch);
+         if($this->file !=null) {
+             fclose($this->file);
+         }
+     }
+
+     /**
+      * Sets the URL to be Called
+	  * @param $url String
+      * @return void
+      */
+     public function setURL($url) {
+         $this->url = $url; 
+     }
+
+     /**
+      * Sets the format type to be extension
+	  * @param $format String
+      * @return boolean
+      */
+	 public function setFormat($format=null){
+		if($format==null)return false;
+		$this->format = $format;
+		return true;
+	 }
+
+     /**
+      * Sets the format type to be decoded
+	  * @param $format String
+      * @return boolean
+      */
+	 public function setDecodeFormat($format=null){
+		if($format==null)return false;
+		$this->decodeFormat = $format;
+		return true;
+	 }
+
+     /**
+      * Set the Content-Type of the request to be send
+      * Format like "application/json" or "application/xml" or "text/plain" or other
+      * @param string $contentType
+      * @return void
+      */
+     public function setContentType($contentType) {
+         $this->contentType = $contentType;
+     }
+
+     /**
+      * Set the authorize info for Basic Authentication
+      * @param $username String
+      * @param $password String
+      * @return void
+      */
+     public function setAuthorizeInfo($username,$password) {
+         if($username != null) { #The password might be blank
+             curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+             curl_setopt($this->ch, CURLOPT_USERPWD, "{$username}:{$password}");
+         }
+     }
+
+     /**
+      * Set the Request HTTP Method
+      * @param $method String
+      * @return void
+      */
+     public function setMethod($method) {
+         $this->method=$method;
+     }
+
+     /**
+      * Set Parameters to be send on the request
+      * It can be both a key/value par array (as in array("key"=>"value"))
+      * or a string containing the body of the request, like a XML, JSON or other
+      * Proper content-type should be set for the body if not a array
+      * @param $params mixed
+      * @return void
+      */
+     public function setParameters($params) {
+         $this->postFields=$params;
+     }
+
+	  /**
+	   * Get the header info to store.
+	   */
+	  public function getHeader($ch, $header) {
+		$i = strpos($header, ':');
+		if (!empty($i)) {
+		  $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));
+		  $value = trim(substr($header, $i + 2));
+		  $this->http_header[$key] = $value;
+		}
+		return strlen($header);
+	  }
+	  
+ }
+?>

RESTClient.class.php

-<?php
-/*
- * 调用远程RESTful的客户端类
- * 要求最低的PHP版本是5.2.0,并且还要支持以下库:cURL, Libxml 2.6.0
- * This class for invoke remote RESTful Webservice
- * The requirement of PHP version is 5.2.0 or above, and support as below:
- * cURL, Libxml 2.6.0
- *
- * @Version: 0.0.1 alpha
- * @Created: 11:06:48 2010/11/23
- * @Author:	Edison tsai<dnsing@gmail.com>
- * @Blog:	http://www.timescode.com
- * @Link:	http://www.dianboom.com
- */
-
- class RESTClient{
-  
-  #cURL Object
-	private $ch;
-  #Contains the last HTTP status code returned.
-	public $http_code;
-  #Contains the last API call.
-	private $http_url;
-  #Set up the API root URL.
-	public $api_url;
-  #Set timeout default.
-	public $timeout = 10;
-  #Set connect timeout.
-	public $connecttimeout = 30; 
-  #Verify SSL Cert.
-	public $ssl_verifypeer = false;
-  #Response format.
-	public $format = ''; // Only support json & xml for extension
-	public $decodeFormat = 'json'; //default is json
-  #Decode returned json data.
-	//public $decode_json = true;
-  #Contains the last HTTP headers returned.
-	public $http_info = array();
-	public $http_header = array();
-	private $contentType;
-	private $postFields;
-	private static $paramsOnUrlMethod = array('GET','DELETE');
-	private static $supportExtension  = array('json','xml');
-  #For tmpFile
-	private $file = null;
-  #Set the useragnet.
-	private static $userAgent = 'Timescode_RESTClient v0.0.1-alpha';
-
-
-	public function __construct(){
-
-		$this->ch = curl_init();
-		/* cURL settings */
-		curl_setopt($this->ch, CURLOPT_USERAGENT, self::$userAgent);
-		curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
-		curl_setopt($this->ch, CURLOPT_TIMEOUT, $this->timeout);
-		curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
-		curl_setopt($this->ch, CURLOPT_AUTOREFERER, TRUE);
-        curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);
-		curl_setopt($this->ch, CURLOPT_HTTPHEADER, array('Expect:'));
-		curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
-		curl_setopt($this->ch, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
-		curl_setopt($this->ch, CURLOPT_HEADER, FALSE);
-
-	}
-
-     /**
-      * Execute calls
-      * @param $url String
-      * @param $method String
-      * @param $postFields String 
-      * @param $username String
-      * @param $password String
-      * @param $contentType String 
-      * @return RESTClient
-      */
-	public function call($url,$method,$postFields=null,$username=null,$password=null,$contentType=null){
-		
-		if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0 && !empty($this->format)) {
-				$url = "{$this->api_url}{$url}.{$this->format}";
-			}
-
-		$this->http_url		= $url;
-		$this->contentType	= $contentType;
-		$this->postFields	= $postFields;
-
-		$url				= in_array($method, self::$paramsOnUrlMethod) ? $this->to_url() : $this->get_http_url();
-
-		is_object($this->ch) or $this->__construct();
-
-		switch ($method) {
-		  case 'POST':
-			curl_setopt($this->ch, CURLOPT_POST, TRUE);
-			if ($this->postFields != null) {
-			  curl_setopt($this->ch, CURLOPT_POSTFIELDS, $this->postFields);
-			}
-			break;
-		  case 'DELETE':
-			curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
-			break;
-		  case 'PUT':
-			curl_setopt($this->ch, CURLOPT_PUT, TRUE);
-			if ($this->postFields != null) {
-				$this->file = tmpFile();
-				fwrite($this->file, $this->postFields);
-				fseek($this->file, 0);
-			  curl_setopt($this->ch, CURLOPT_INFILE,$this->file);
-			  curl_setopt($this->ch, CURLOPT_INFILESIZE,strlen($this->postFields));
-			}
-			break;
-		}
-
-		$this->setAuthorizeInfo($username, $password);
-		$this->contentType != null && curl_setopt($this->ch, CURLOPT_HTTPHEADER, array('Content-type:'.$this->contentType));
-
-		curl_setopt($this->ch, CURLOPT_URL, $url);
-
-		$response = curl_exec($this->ch);
-		$this->http_code = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
-		$this->http_info = array_merge($this->http_info, curl_getinfo($this->ch));
-
-		$this->close();
-
-		return $response;
-	}
-
-
-     /**
-      * POST wrapper for insert data
-      * @param $url String
-      * @param $params mixed 
-      * @param $username String
-      * @param $password String
-      * @param $contentType String
-      * @return RESTClient
-      */
-     public function _POST($url,$params=null,$username=null,$password=null,$contentType=null) {
-         $response = $this->call($url,'POST',$params,$username,$password,$contentType);
-		 return $this->parseResponse($response);
-     }
-
-     /**
-      * PUT wrapper for update data
-      * @param $url String
-      * @param $params mixed 
-      * @param $username String
-      * @param $password String
-      * @param $contentType String
-      * @return RESTClient
-      */
-     public function _PUT($url,$params=null,$username=null,$password=null,$contentType=null) {
-         $response = $this->call($url,'PUT',$params,$username,$password,$contentType);
-		 return $this->parseResponse($response);
-     }
-
-     /**
-      * GET wrapper for get data
-      * @param $url String
-      * @param $params mixed
-      * @param $username String
-      * @param $password String
-      * @return RESTClient
-      */
-     public function _GET($url,$params=null,$username=null,$password=null) {
-         $response = $this->call($url,'GET',$params,$username,$password);
-		 return $this->parseResponse($response);
-     }
-
-     /**
-      * DELETE wrapper for delete data
-      * @param $url String
-      * @param $params mixed
-      * @param $username String
-      * @param $password String
-      * @return RESTClient
-      */
-     public function _DELETE($url,$params=null,$username=null,$password=null) {
-		 #Modified by Edison tsai on 09:50 2010/11/26 for missing part
-		 $response = $this->call($url,'DELETE',$params,$username,$password);
-		 return $this->parseResponse($response);
-     }
-
-	 /*
-	 * Parse response, including json, xml, plain text
-	 * @param $resp String
-	 * @param $ext	String, including json/xml
-	 * @return String
-	 */
-	 public function parseResponse($resp,$ext=''){
-		
-		$ext = !in_array($ext, self::$supportExtension) ? $this->decodeFormat : $ext;
-		
-		switch($ext){
-				case 'json':
-					# modify by tom.wang at 2011-05-15 : add 2nd param to generate array
-					$resp = json_decode($resp, true);break;
-				case 'xml':
-					$resp = self::xml_decode($resp);break;
-		}
-			return $resp;
-	 }
-
-	 /*
-	 * XML decode
-	 * @param $data String
-	 * @param $toArray boolean, true for make it be array
-	 * @return String
-	 */
-	  public static function xml_decode($data,$toArray=false){
-		  /* TODO: What to do with 'toArray'? Just write it as you need. */
-			$data = simplexml_load_string($data);
-			return $data;
-	  }
-
-	  public static function objectToArray($obj){
-			
-	  }
-
-	   /**
-	   * parses the url and rebuilds it to be
-	   * scheme://host/path
-	   */
-	  public function get_http_url() {
-		$parts = parse_url($this->http_url);
-
-		$port = @$parts['port'];
-		$scheme = $parts['scheme'];
-		$host = $parts['host'];
-		$path = @$parts['path'];
-
-		$port or $port = ($scheme == 'https') ? '443' : '80';
-
-		if (($scheme == 'https' && $port != '443')
-			|| ($scheme == 'http' && $port != '80')) {
-		  $host = "$host:$port";
-		}
-		return "$scheme://$host$path";
-	  }
-
-	  /**
-	   * builds a url usable for a GET request
-	   */
-	  public function to_url() {
-		$post_data = $this->to_postdata();
-		$out = $this->get_http_url();
-		if ($post_data) {
-		  $out .= '?'.$post_data;
-		}
-		return $out;
-	  }
-
-	  /**
-	   * builds the data one would send in a POST request
-	   */
-	  public function to_postdata() {
-		return http_build_query($this->postFields);
-	  }
-
-     /**
-      * Settings that won't follow redirects
-      * @return RESTClient
-      */
-     public function setNotFollow() {
-         curl_setopt($this->ch,CURLOPT_AUTOREFERER,FALSE);
-         curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION,FALSE);
-         return $this;
-     }
-
-     /**
-      * Closes the connection and release resources
-      * @return void
-      */
-     public function close() {
-         curl_close($this->ch);
-         if($this->file !=null) {
-             fclose($this->file);
-         }
-     }
-
-     /**
-      * Sets the URL to be Called
-	  * @param $url String
-      * @return void
-      */
-     public function setURL($url) {
-         $this->url = $url; 
-     }
-
-     /**
-      * Sets the format type to be extension
-	  * @param $format String
-      * @return boolean
-      */
-	 public function setFormat($format=null){
-		if($format==null)return false;
-		$this->format = $format;
-		return true;
-	 }
-
-     /**
-      * Sets the format type to be decoded
-	  * @param $format String
-      * @return boolean
-      */
-	 public function setDecodeFormat($format=null){
-		if($format==null)return false;
-		$this->decodeFormat = $format;
-		return true;
-	 }
-
-     /**
-      * Set the Content-Type of the request to be send
-      * Format like "application/json" or "application/xml" or "text/plain" or other
-      * @param string $contentType
-      * @return void
-      */
-     public function setContentType($contentType) {
-         $this->contentType = $contentType;
-     }
-
-     /**
-      * Set the authorize info for Basic Authentication
-      * @param $username String
-      * @param $password String
-      * @return void
-      */
-     public function setAuthorizeInfo($username,$password) {
-         if($username != null) { #The password might be blank
-             curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
-             curl_setopt($this->ch, CURLOPT_USERPWD, "{$username}:{$password}");
-         }
-     }
-
-     /**
-      * Set the Request HTTP Method
-      * @param $method String
-      * @return void
-      */
-     public function setMethod($method) {
-         $this->method=$method;
-     }
-
-     /**
-      * Set Parameters to be send on the request
-      * It can be both a key/value par array (as in array("key"=>"value"))
-      * or a string containing the body of the request, like a XML, JSON or other
-      * Proper content-type should be set for the body if not a array
-      * @param $params mixed
-      * @return void
-      */
-     public function setParameters($params) {
-         $this->postFields=$params;
-     }
-
-	  /**
-	   * Get the header info to store.
-	   */
-	  public function getHeader($ch, $header) {
-		$i = strpos($header, ':');
-		if (!empty($i)) {
-		  $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));
-		  $value = trim(substr($header, $i + 2));
-		  $this->http_header[$key] = $value;
-		}
-		return strlen($header);
-	  }
-	  
- }
-?>

RenRenClient.class.php

-<?php
-/*
- * 调用人人网RESTful API的客户端类,本类需要继承RESTClient类方可使用
- * 要求最低的PHP版本是5.2.0,并且还要支持以下库:cURL, Libxml 2.6.0
- * This class for invoke RenRen RESTful Webservice
- * It MUST be extends RESTClient
- * The requirement of PHP version is 5.2.0 or above, and support as below:
- * cURL, Libxml 2.6.0
- *
- * @Modified by Edison tsai on 14:41 2011/01/13 for wrap call_id & session_key in this class.
- *
- * @Version: 0.0.5 alpha
- * @Created: 17:09:40 2010/11/23
- * @Author:	Edison tsai<dnsing@gmail.com>
- * @Blog:	http://www.timescode.com
- * @Link:	http://www.dianboom.com
- */
-
- class RenRenClient extends RESTClient{
-
-	private $_config;
-	private	$_postFields	= '';
-	private $_params		=	array();
-	private $_currentMethod;
-	private static $_sigKey = 'sig';
-	private	$_sig			= '';
-	private $_call_id		= '';
-	private $_session_key	= '';
-	private $_keyMapping	= array(
-				'api_key'	=>	'',
-				'method'	=>	'',
-				'v'			=>	'',
-				'format'	=>	'',
-				'call_id'	=>	'',
-				'session_key'=>	'',
-			);
-	
-	public function __construct(){
-		global $config;
-		
-		parent::__construct();
-		
-		$this->_config = $config;
-		
-		if(empty($this->_config->APIURL) || empty($this->_config->APIKey) || empty($this->_config->SecretKey)){
-			throw new exception('Invalid API URL or API key or Secret key, please check config.inc.php');
-		}
-
-	}
-
-     /**
-      * GET wrapper
-      * @param method String
-      * @param parameters Array
-      * @return mixed
-      */
-	public function GET(){
-
-		$args = func_get_args();
-		$this->_currentMethod	= trim($args[0]); #Method
-		$this->paramsMerge($args[1])
-			 ->getCallId()
-			 ->getSessionKey()
-			 ->setConfigToMapping()
-			 ->generateSignature();
-
-		#Invoke
-		unset($args);
-
-		return $this->_GET($this->_config->APIURL, $this->_params);
-	
-	}
-
-     /**
-      * POST wrapper
-      * @param method String
-      * @param parameters Array
-      * @return mixed
-      */
-	public function POST(){
-
-		$args = func_get_args();
-		$this->_currentMethod	= trim($args[0]); #Method
-		$this->paramsMerge($args[1])
-			 ->getCallId()
-			 ->getSessionKey()
-			 ->setConfigToMapping()
-			 ->generateSignature();
-
-		#Invoke
-		unset($args);
-
-		return $this->_POST($this->_config->APIURL, $this->_params);
-	
-	}
-
-     /**
-      * PUT wrapper
-      * @param method String
-      * @param parameters Array
-      * @return mixed
-      */
-	public function PUT(){
-
-		$args = func_get_args();
-		$this->_currentMethod	= trim($args[0]); #Method
-		$this->paramsMerge($args[1])
-			 ->getCallId()
-			 ->getSessionKey()
-			 ->setConfigToMapping()
-			 ->generateSignature();
-
-		#Invoke
-		unset($args);
-
-		return $this->_PUT($this->_config->APIURL, $this->_params);
-	
-	}
-
-     /**
-      * DELETE wrapper
-      * @param method String
-      * @param parameters Array
-      * @return mixed
-      */
-	public function DELETE(){
-
-		$args = func_get_args();
-		$this->_currentMethod	= trim($args[0]); #Method
-		$this->paramsMerge($args[1])
-			 ->getCallId()
-			 ->getSessionKey()
-			 ->setConfigToMapping()
-			 ->generateSignature();
-
-		#Invoke
-		unset($args);
-
-		return $this->_DELETE($this->_config->APIURL, $this->_params);
-	
-	}
-
-     /**
-      * Generate signature for sig parameter
-      * @param method String
-      * @param parameters Array
-      * @return RenRenClient
-      */
-	private function generateSignature(){
-
-			$arr = array_merge($this->_params, $this->_keyMapping);
-			ksort($arr);
-			reset($arr);
-			$str = '';
-			foreach($arr AS $k=>$v){
-				$str .= $k.'='.$v;
-			}
-			
-			$this->_params = $arr;
-			$str = md5($str.$this->_config->SecretKey);
-			$this->_params[self::$_sigKey] = $str;
-			$this->_sig = $str;
-
-			unset($str, $arr);
-
-			return $this;
-	}
-
-     /**
-      * Parameters merge
-      * @param $params Array
-	  * @modified by Edison tsai on 15:56 2011/01/13 for fix non-object bug
-	  * @modified by Tom on 15:53 2011/06/24 for fix sig param bug
-      * @return RenRenClient
-      */
-	private function paramsMerge($params){
-
-		$valid = true;
-		if(!is_array($params) || !isset($this->_config->APIMapping[$this->_currentMethod])) {
-			$valid = false;
-		} else {
-			$arr1 = explode(',', $this->_config->APIMapping[$this->_currentMethod]);
-			if(count($params) != count($arr1)) $valid = false;
-		}
-
-		if(!$valid) {
-			$this->_params = array();
-			return $this;
-		}
-
-		$arr2 = array_combine($arr1, $params);
-
-		if(count($arr2)<1 || !$arr2){
-
-			foreach($arr1 AS $k=>$v){
-				$arr2[$v] = $params[$k];
-			} #end foreach
-
-		} #end if
-
-		$this->_params = $arr2;
-
-		unset($arr1, $arr2);
-
-		return $this;
-	}
-
-     /**
-      * Setting mapping value
-	  * @modified by Edison tsai on 15:04 2011/01/13 for add call id & session_key
-      * @return RenRenClient
-      */
-	private function setConfigToMapping(){
-
-			$this->_keyMapping['api_key']	= $this->_config->APIKey;
-			$this->_keyMapping['method']	= $this->_currentMethod;
-			$this->_keyMapping['v']			= $this->_config->APIVersion;
-			$this->_keyMapping['format']	= $this->_config->decodeFormat;
-			$this->_keyMapping['call_id']	= $this->_call_id;
-			$this->_keyMapping['session_key']=$this->_session_key;
-
-		return $this;
-	}
-
-	private function setAPIURL($url){
-			$this->_config->APIURL = $url;
-	}
-
-  /**
-    * Generate call id
-	* @author Edison tsai
-	* @created 14:48 2011/01/13
-    * @return RenRenClient
-	* 
-	* @modify by tom.wang at 2011-05-12 : add isGotCallId support
-    */
-	public function getCallId(){
-		$this->isGotCallId() or $this->_call_id = str_pad(mt_rand(1, 9999999999), 10, 0, STR_PAD_RIGHT);
-		return $this;
-	}
-
-  /**
-    * Set call id
-	* @param $call_id float or integer, default is zero '0'
-	* @author Edison tsai
-	* @created 15:06 2011/01/13
-    * @return null
-	*
-	* @modify by tom.wang 2011-05-12 : change private to public
-    */
-	public function setCallId($call_id=0){
-		$this->_call_id = $call_id;
-		return $this->_call_id;
-	}
-
-  /**
-    * Get session key
-	* @author Edison tsai
-	* @created 15:09 2011/01/13
-    * @return RenRenClient
-    */
-	private function getSessionKey(){
-		$this->isGotSessionKey() or $this->_session_key	= $_COOKIE[$this->_config->APIKey.'_session_key'];
-		return $this;
-	}
-
-   /**
-    * Set session key
-	* @param $session_key, String
-	* @author Edison tsai
-	* @created 15:10 2011/01/13
-    * @return RenRenClient
-    */
-	public function setSessionKey($session_key){
-		!empty($session_key) and $this->_session_key = $session_key;
-		return $this;
-	}
-
-  /**
-    * Is got session key or not?
-	* @author Edison tsai
-	* @created 15:11 2011/01/13
-    * @return boolean
-    */
-	private function isGotSessionKey(){
-		return empty($this->_session_key) ? false : true;
-	}
-	
-	/**
-	 * is got call id or not
-	 *
-	 * @author tom.wang<superlinyzu@qq.com>
-	 * @return boolean
-	 */
-	private function isGotCallId() {
-		return empty($this->_call_id) ? false : true;
-	}
- }
-?>

RenRenOauth.class.php

-<?php
-/**
- * renren oauth flow(web server flow)
- * please oauth2 details here : http://wiki.dev.renren.com/wiki/%E4%BD%93%E9%AA%8C%E4%BA%BA%E4%BA%BAOAuth2.0%E9%AA%8C%E8%AF%81%E6%8E%88%E6%9D%83%E5%9F%BA%E6%9C%AC%E6%B5%81%E7%A8%8B
- *
- * @author tom.wang<superlinyzu@qq.com>
- */
-class RenRenOauth extends RESTClient {
-	private $_config;
-	
-	/**
-	 * construct function
-	 *
-	 * @author tom.wang<superlinyzu@qq.com>
-	 */
-	public function __construct(){
-		global $config;
-		
-		parent::__construct();
-		
-		$this->_config = $config;
-		
-		if(empty($this->_config->AUTHORIZEURL) || empty($this->_config->ACCESSTOKENURL) || empty($this->_config->SESSIONKEYURL) || empty($this->_config->CALLBACK)){
-			throw new exception('Invalid AUTHORIZEURL or ACCESSTOKENURL or SESSIONKEYURL or CALLBACK, please check config.inc.php');
-		}
-
-	}
-	/**
-	 * get authorize url
-	 * please read details at : http://wiki.dev.renren.com/wiki/%E8%8E%B7%E5%8F%96Authorization_Code
-	 *
-	 * @author tom.wang<superlinyzu@qq.com>
-	 * @return string : the url used for user to authorize
-	 */
-	public function getAuthorizeUrl() {
-		$url = $this->_config->AUTHORIZEURL . '?response_type=code&client_id=' . $this->_config->APIKey . '&redirect_uri=' . urlencode($this->_config->CALLBACK);
-		
-		return $url;
-	}
-	
-	/**
-	 * get access token
-	 * please read details at : http://wiki.dev.renren.com/wiki/%E4%BD%BF%E7%94%A8Authorization_Code%E8%8E%B7%E5%8F%96Access_Token
-	 *
-	 * @author tom.wang<superlinyzu@qq.com>
-	 * @param string $code : the authorized code
-	 * @return string : access token
-	 */
-	public function getAccessToken($code) {
-		$url = $this->_config->ACCESSTOKENURL;
-		$params = array(
-			'client_id' => $this->_config->APIKey,
-			'client_secret' => $this->_config->SecretKey,
-			'redirect_uri' => $this->_config->CALLBACK,
-			'grant_type' => 'authorization_code',
-			'code' => $code,
-		);
-		$ret = $this->call($url, 'POST', $params);
-		$ret = json_decode($ret, true);
-		
-		# check error
-		if(isset($ret['error_description'])) {
-			throw new Exception($ret['error_description']);
-		}
-		
-		return $ret;
-	}
-	
-	/**
-	 * get session key
-	 *
-	 * @author tom.wang<superlinyzu@qq.com>
-	 * @param string $access_token
-	 * @return string : session key
-	 */
-	public function getSessionKey($access_token) {
-		$url = $this->_config->SESSIONKEYURL;
-		$params = array(
-			'oauth_token' => $access_token,
-		);
-		$ret = $this->call($url, 'POST', $params);
-		$ret = json_decode($ret, true);
-		
-		# check error
-		if(isset($ret['error_description'])) {
-			throw new Exception($ret['error_description']);
-		}
-		
-		return $ret;
-	}
-}
-?>

RenrenRestApiService.class.php

+<?php
+/*
+ * 调用人人网RESTful API的客户端类,本类需要继承RESTClient类方可使用
+ * 要求最低的PHP版本是5.2.0,并且还要支持以下库:cURL, Libxml 2.6.0
+ * This class for invoke RenRen RESTful Webservice
+ * It MUST be extends RESTClient
+ * The requirement of PHP version is 5.2.0 or above, and support as below:
+ * cURL, Libxml 2.6.0
+ *
+ * @Modified by mike on 17:54 2011/12/21.
+ * @Modified by Edison tsai on 14:41 2011/01/13 for wrap call_id & session_key in this class.
+ *
+ * @Version: 0.0.5 alpha
+ * @Created: 17:09:40 2010/11/23
+ * @Author:	Edison tsai<dnsing@gmail.com>
+ * @Blog:	http://www.timescode.com
+ * @Link:	http://www.dianboom.com
+ */
+
+require_once 'HttpRequestService.class.php';
+require_once 'config.inc.php'; #Include configure resources
+
+ class RenrenRestApiService extends HttpRequestService{
+
+	private $_config;
+	private	$_postFields	= '';
+	private $_params		=	array();
+	private $_currentMethod;
+	private static $_sigKey = 'sig';
+	private	$_sig			= '';
+	private $_call_id		= '';
+	
+	private $_keyMapping	= array(
+				'api_key'	=>	'',
+				'method'	=>	'',
+				'v'			=>	'',
+				'format'	=>	'',
+			);
+	
+	public function __construct(){
+		global $config;
+		
+		parent::__construct();
+		
+		$this->_config = $config;
+		
+		if(empty($this->_config->APIURL) || empty($this->_config->APIKey) || empty($this->_config->SecretKey)){
+			throw new exception('Invalid API URL or API key or Secret key, please check config.inc.php');
+		}
+
+	}
+
+     /**
+      * GET wrapper
+      * @param method String
+      * @param parameters Array
+      * @return mixed
+      */
+	public function GET(){
+
+		$args = func_get_args();
+		$this->_currentMethod	= trim($args[0]); #Method
+		$this->paramsMerge($args[1])
+			 ->getCallId()
+			 ->setConfigToMapping()
+			 ->generateSignature();
+
+		#Invoke
+		unset($args);
+
+		return $this->_GET($this->_config->APIURL, $this->_params);
+	
+	}
+
+     /**
+      * POST wrapper,基于curl函数,需要支持curl函数才行
+      * @param method String
+      * @param parameters Array
+      * @return mixed
+      */
+	public function rr_post_curl(){
+
+		$args = func_get_args();
+		$this->_currentMethod	= trim($args[0]); #Method
+		$this->paramsMerge($args[1])
+			 ->getCallId()
+			 ->setConfigToMapping()
+			 ->generateSignature();
+
+		#Invoke
+		unset($args);
+
+		return $this->_POST($this->_config->APIURL, $this->_params);
+	
+	}
+     /**
+      * Generate signature for sig parameter
+      * @param method String
+      * @param parameters Array
+      * @return RenRenClient
+      */
+	private function generateSignature(){
+			$arr = array_merge($this->_params, $this->_keyMapping);
+			ksort($arr);
+			reset($arr);
+			$str = '';
+			foreach($arr AS $k=>$v){
+				$v=$this->convertEncoding($v,$this->_encode,"utf-8");
+				$arr[$k]=$v;//转码,你懂得
+				$str .= $k.'='.$v;
+			}
+			
+			$this->_params = $arr;
+			$str = md5($str.$this->_config->SecretKey);
+			$this->_params[self::$_sigKey] = $str;
+			$this->_sig = $str;
+
+			unset($str, $arr);
+
+			return $this;
+	}
+
+	
+     /**
+      * Parameters merge
+      * @param $params Array
+	  * @modified by Edison tsai on 15:56 2011/01/13 for fix non-object bug
+      * @return RenRenClient
+      */
+	private function paramsMerge($params){
+		$this->_params = $params;
+		return $this;
+	}
+
+     /**
+      * Setting mapping value
+	  * @modified by Edison tsai on 15:04 2011/01/13 for add call id & session_key
+      * @return RenRenClient
+      */
+	private function setConfigToMapping(){
+			$this->_keyMapping['api_key']	= $this->_config->APIKey;
+			$this->_keyMapping['method']	= $this->_currentMethod;
+			$this->_keyMapping['v']			= $this->_config->APIVersion;
+			$this->_keyMapping['format']	= $this->_config->decodeFormat;
+		return $this;
+	}
+
+	private function setAPIURL($url){
+			$this->_config->APIURL = $url;
+	}
+
+  /**
+    * Generate call id
+	* @author Edison tsai
+	* @created 14:48 2011/01/13
+    * @return RenRenClient
+    */
+	public function getCallId(){
+		$this->_call_id = str_pad(mt_rand(1, 9999999999), 10, 0, STR_PAD_RIGHT);
+		return $this;
+	}
+	
+	public function rr_post_fopen(){
+
+		$args = func_get_args();
+		$this->_currentMethod	= trim($args[0]); #Method
+		$this->paramsMerge($args[1])
+			 ->getCallId()
+			 ->setConfigToMapping()
+			 ->generateSignature();
+
+		#Invoke
+		unset($args);
+
+		return $this->_POST_FOPEN($this->_config->APIURL, $this->_params);
+	
+	}
+	public function rr_photo_post_fopen(){
+
+		$args = func_get_args();
+		$this->_currentMethod	= trim($args[0]); #Method
+		$this->paramsMerge($args[1])
+			 ->getCallId()
+			 ->setConfigToMapping()
+			 ->generateSignature();
+
+		#Invoke
+		$photo_files=$args[2];
+
+		unset($args);
+		return $this->_photoUpload($this->_config->APIURL, $this->_params,$photo_files);
+	
+	}
+	
+	
+ }
+?>
  * 总体配置文件,包括API Key, Secret Key,以及所有允许调用的API列表
  * This file for configure all necessary things for invoke, including API Key, Secret Key, and all APIs list
  *
+ * @Modified by mike on 17:54 2011/12/21.
  * @Modified by Edison tsai on 16:34 2011/01/13 for remove call_id & session_key in all parameters.
  * @Created: 17:21:04 2010/11/23
  * @Author:	Edison tsai<dnsing@gmail.com>
 
 $config				= new stdClass;
 
-# modify by tom.wang at 2011-05-12 : add relate url for oauth flow
-$config->AUTHORIZEURL = 'https://graph.renren.com/oauth/authorize';  //进行连接授权的地址,不需要修改
-$config->ACCESSTOKENURL = 'https://graph.renren.com/oauth/token'; //获取access token的地址,不需要修改
-$config->SESSIONKEYURL = 'https://graph.renren.com/renren_api/session_key'; //获取session key的地址,不需要修改
-$config->CALLBACK = 'http://www.example.com/renren-api-php-sdk/example/oauth/2_callback.php'; //回调地址,注意和您申请的应用一致
-
 $config->APIURL		= 'http://api.renren.com/restserver.do'; //RenRen网的API调用地址,不需要修改
-$config->APIKey		= '9bbac42e58c844cd85c89aa7529*****';	//你的API Key,请自行申请
-$config->SecretKey	= '7e099f5ebb8346c18453fd2539f*****';	//你的API 密钥
+$config->APIKey		= 'dd3ffbf2bd894ca9819f5dbc82c2f39c';	//你的API Key,请自行申请
+$config->SecretKey	= 'f6d6d1308e314737ac955ba24a5aecc0';	//你的API 密钥
 $config->APIVersion	= '1.0';	//当前API的版本号,不需要修改
 $config->decodeFormat	= 'json';	//默认的返回格式,根据实际情况修改,支持:json,xml
-/*
- *@ 以下接口内容来自http://wiki.dev.renren.com/wiki/API,编写时请遵守以下规则:
- *  key  (键名)		: API方法名,直接Copy过来即可,请区分大小写
- *  value(键值)		: 把所有的参数,包括required及optional,除了api_key,method,v,format不需要填写之外,
- *					  其它的都可以根据你的实现情况来处理,以英文半角状态下的逗号来分割各个参数。
- */
-$config->APIMapping		= array( 
-		'admin.getAllocation' => '',
-		'connect.getUnconnectedFriendsCount' => '',
-		'friends.areFriends' => 'uids1,uids2',
-		'friends.get' => 'page,count',
-		'friends.getFriends' => 'page,count',
-		'notifications.send' => 'to_ids,notification',
-		'users.getInfo'	=> 'uids,fields',
-		/* 更多的方法,请自行添加 
-		   For more methods, please add by yourself.
-		*/
-);
 ?>

doc/classes.jpg

Removed
Old image

doc/classes.uml

-<?xml version="1.0" encoding="UTF-8"?>
-<XPD:PROJECT xmlns:XPD="http://www.staruml.com" version="1">
-<XPD:HEADER>
-<XPD:SUBUNITS>
-</XPD:SUBUNITS>
-<XPD:PROFILES>
-<XPD:PROFILE>UMLStandard</XPD:PROFILE>
-</XPD:PROFILES>
-</XPD:HEADER>
-<XPD:BODY>
-<XPD:OBJ name="DocumentElement" type="UMLProject" guid="prtGcLOR7kueD7QrVb9GtQAA">
-<XPD:ATTR name="Title" type="string">Untitled</XPD:ATTR>
-<XPD:ATTR name="#OwnedElements" type="integer">5</XPD:ATTR>
-<XPD:OBJ name="OwnedElements[0]" type="UMLModel" guid="Bj3/sFpZJE2pIRLk2T2hZwAA">
-<XPD:ATTR name="Name" type="string">Use Case Model</XPD:ATTR>
-<XPD:ATTR name="StereotypeProfile" type="string">UMLStandard</XPD:ATTR>
-<XPD:ATTR name="StereotypeName" type="string">useCaseModel</XPD:ATTR>
-<XPD:REF name="Namespace">prtGcLOR7kueD7QrVb9GtQAA</XPD:REF>
-<XPD:ATTR name="#OwnedDiagrams" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="OwnedDiagrams[0]" type="UMLUseCaseDiagram" guid="zgPbmZqapUOiN4CRSvUUVQAA">
-<XPD:ATTR name="Name" type="string">Main</XPD:ATTR>
-<XPD:REF name="DiagramOwner">Bj3/sFpZJE2pIRLk2T2hZwAA</XPD:REF>
-<XPD:OBJ name="DiagramView" type="UMLUseCaseDiagramView" guid="FbpBQRfjBkiFqmcX6u7KagAA">
-<XPD:REF name="Diagram">zgPbmZqapUOiN4CRSvUUVQAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedElements[1]" type="UMLModel" guid="efN4ONJ6i0SMjIP0Y0rT5QAA">
-<XPD:ATTR name="Name" type="string">Analysis Model</XPD:ATTR>
-<XPD:ATTR name="StereotypeProfile" type="string">UMLStandard</XPD:ATTR>
-<XPD:ATTR name="StereotypeName" type="string">analysisModel</XPD:ATTR>
-<XPD:REF name="Namespace">prtGcLOR7kueD7QrVb9GtQAA</XPD:REF>
-<XPD:ATTR name="#OwnedDiagrams" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="OwnedDiagrams[0]" type="UMLClassDiagram" guid="HwJ1W9AJOkGirWj04KJViQAA">
-<XPD:ATTR name="Name" type="string">Main</XPD:ATTR>
-<XPD:ATTR name="DefaultDiagram" type="boolean">True</XPD:ATTR>
-<XPD:ATTR name="DiagramType" type="string">RobustnessDiagram</XPD:ATTR>
-<XPD:REF name="DiagramOwner">efN4ONJ6i0SMjIP0Y0rT5QAA</XPD:REF>
-<XPD:OBJ name="DiagramView" type="UMLClassDiagramView" guid="4BG+e87kZUiHpeTNepcUwwAA">
-<XPD:REF name="Diagram">HwJ1W9AJOkGirWj04KJViQAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedElements[2]" type="UMLModel" guid="tIrBpqkk8EiNl/gQxibVOwAA">
-<XPD:ATTR name="Name" type="string">Design Model</XPD:ATTR>
-<XPD:ATTR name="StereotypeProfile" type="string">UMLStandard</XPD:ATTR>
-<XPD:ATTR name="StereotypeName" type="string">designModel</XPD:ATTR>
-<XPD:REF name="Namespace">prtGcLOR7kueD7QrVb9GtQAA</XPD:REF>
-<XPD:ATTR name="#OwnedDiagrams" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="OwnedDiagrams[0]" type="UMLClassDiagram" guid="Qsxscf2UzE2o/eIioVF4gQAA">
-<XPD:ATTR name="Name" type="string">Main</XPD:ATTR>
-<XPD:ATTR name="DefaultDiagram" type="boolean">True</XPD:ATTR>
-<XPD:REF name="DiagramOwner">tIrBpqkk8EiNl/gQxibVOwAA</XPD:REF>
-<XPD:OBJ name="DiagramView" type="UMLClassDiagramView" guid="qAJOGSo8tESlSmb4zn29EQAA">
-<XPD:REF name="Diagram">Qsxscf2UzE2o/eIioVF4gQAA</XPD:REF>
-<XPD:ATTR name="#OwnedViews" type="integer">11</XPD:ATTR>
-<XPD:OBJ name="OwnedViews[0]" type="UMLClassView" guid="iehVS4s63UmAuqb/RA+XEwAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Left" type="integer">268</XPD:ATTR>
-<XPD:ATTR name="Width" type="integer">482</XPD:ATTR>
-<XPD:ATTR name="Height" type="integer">550</XPD:ATTR>
-<XPD:REF name="Model">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:OBJ name="NameCompartment" type="UMLNameCompartmentView" guid="17hoA3ePJka95pJpD5eVQAAA">
-<XPD:OBJ name="NameLabel" type="LabelView" guid="mFWq12e2hUyOgi2rQ+uj3AAA">
-<XPD:ATTR name="FontStyle" type="integer">1</XPD:ATTR>
-<XPD:ATTR name="Text" type="string">RESTClient</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="StereotypeLabel" type="LabelView" guid="BTAsk4hYZ0ig66wCC88udQAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="PropertyLabel" type="LabelView" guid="vOIBwcxEwk2/jimYCGrEGgAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="AttributeCompartment" type="UMLAttributeCompartmentView" guid="EEtvLuvj90aaW61EMRWkrAAA">
-<XPD:REF name="Model">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="OperationCompartment" type="UMLOperationCompartmentView" guid="Tqw3RTv4jESO64NJSE+1jQAA">
-<XPD:REF name="Model">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="TemplateParameterCompartment" type="UMLTemplateParameterCompartmentView" guid="m+4GrM/TOUu3szR2aBEkkQAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:REF name="Model">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[1]" type="UMLNoteView" guid="ron4TGwqGkGE26tssiXkyAAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Left" type="integer">836</XPD:ATTR>
-<XPD:ATTR name="Width" type="integer">503</XPD:ATTR>
-<XPD:ATTR name="Height" type="integer">668</XPD:ATTR>
-<XPD:ATTR name="Text" type="string">rest客户端类
-一、属性:
-$ch:保存一个curl对象。
-$http_url:保存最近一次请求的地址。
-$contentType:保存最近一次请求的content-type。
-$postFields:保存最近一次请求提供的参数。
-$paramsOnUrlMethod:设置针对那些请求方法是将参数放在url后面传递(查询字符串)。
-$supportExtension:支持的对http响应结果的解码方式。
-$file:临时文件,用于PUT请求。
-$userAgent:请求时传递的客户端标识(如同浏览器)。
-$http_code:保存最近一次请求的响应码。
-$api_url
-$timeout:执行curl函数的最大时间(秒)
-$connecttimeout:尝试连接的时间(秒),0表示无限制。
-$ssl_verifypeer
-$format
-$decodeFormat:对http响应结果解码方式(默认值)。
-$http_info:保存最近一次http请求的详细信息。
-$http_header:保存最近一次http请求头信息。
-
-二、方法:
-__construct():构造函数,初始化curl,设置curl选项。
-call:http请求底层方法,_POST, _PUT, _GET, _DELETE最终都调用该方法。
-_POST:POST请求,返回的数据是经过解码的。
-_PUT:同上。
-_GET:同上。
-_DELETE:同上。
-parseResponse:根据指定的解码方式,对http响应数据进行解码。
-xml_decode:xml解码,json解码直接用json_decode。
-objectToArray:对象-&gt;数组转化,空方法。
-get_http_url:将指定url处理成“scheme://host:port/path”格式。生成的url供$paramsOnUrlMethod
-属性中的http请求方法使用
-to_url:处理成带查询字符串的url,供$paramsOnUrlMethod属性中的http请求方法使用。
-to_postdata:将$postFields属性值转化成查询字符串。
-setNotFollow:设置curl不处理跳转(location)。
-close:关闭连接,释放资源。
-setURL
-setFormat:设置$format属性值。
-setDecodeFormat:设置$decodeFormat属性值。
-setContentType:设置$contentType属性值。
-setAuthorizeInfo:设置http basic验证信息。
-setMethod:设置$method属性值。
-setParameters:设置$postFields属性值(请求时传递的参数)。
-getHeader:用于CURLOPT_HEADERFUNCTION选项的回调函数。
-</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[2]" type="UMLNoteLinkView" guid="jsbx+xNJgUGQWxzi+nxzewAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Points" type="Points">836,307;749,298</XPD:ATTR>
-<XPD:REF name="Head">iehVS4s63UmAuqb/RA+XEwAA</XPD:REF>
-<XPD:REF name="Tail">ron4TGwqGkGE26tssiXkyAAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[3]" type="UMLClassView" guid="44Kufrd59Eq6RD+03WoxmQAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Left" type="integer">180</XPD:ATTR>
-<XPD:ATTR name="Top" type="integer">608</XPD:ATTR>
-<XPD:ATTR name="Width" type="integer">159</XPD:ATTR>
-<XPD:ATTR name="Height" type="integer">355</XPD:ATTR>
-<XPD:REF name="Model">1UprW0RTWUSwso7EEzQbUwAA</XPD:REF>
-<XPD:OBJ name="NameCompartment" type="UMLNameCompartmentView" guid="qWqV7+Lg/kaJneiZQX9aygAA">
-<XPD:OBJ name="NameLabel" type="LabelView" guid="MJ6Za1ORFUa0o0LEwS3IdQAA">
-<XPD:ATTR name="FontStyle" type="integer">1</XPD:ATTR>
-<XPD:ATTR name="Text" type="string">RenRenClient</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="StereotypeLabel" type="LabelView" guid="aRp/JvDQLU+ORS4Cx39jqQAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="PropertyLabel" type="LabelView" guid="hbzCHysJSUqghyvtvT5NZgAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="AttributeCompartment" type="UMLAttributeCompartmentView" guid="EZdC1urAvkWS8V4Q6Dr+yQAA">
-<XPD:REF name="Model">1UprW0RTWUSwso7EEzQbUwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="OperationCompartment" type="UMLOperationCompartmentView" guid="2W5FUkDF2UyTzJcYAfSWEwAA">
-<XPD:REF name="Model">1UprW0RTWUSwso7EEzQbUwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="TemplateParameterCompartment" type="UMLTemplateParameterCompartmentView" guid="KaxAhKoenEO9IVQtT0UVKgAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:REF name="Model">1UprW0RTWUSwso7EEzQbUwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[4]" type="UMLGeneralizationView" guid="kDlKP0KAlkKSTU2Py+EDAwAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Points" type="Points">338,623;374,549</XPD:ATTR>
-<XPD:REF name="Model">/PBi8bYjmUKs3cqBLBsK9gAA</XPD:REF>
-<XPD:REF name="Head">iehVS4s63UmAuqb/RA+XEwAA</XPD:REF>
-<XPD:REF name="Tail">44Kufrd59Eq6RD+03WoxmQAA</XPD:REF>
-<XPD:OBJ name="NameLabel" type="EdgeLabelView" guid="7prYnLB+zUGAweLCsgVnSgAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:ATTR name="Alpha" type="real">1.5707963267949</XPD:ATTR>
-<XPD:ATTR name="Distance" type="real">15</XPD:ATTR>
-<XPD:REF name="Model">/PBi8bYjmUKs3cqBLBsK9gAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="StereotypeLabel" type="EdgeLabelView" guid="PNRK1XsSn0qhbz7kU0jp9gAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:ATTR name="Alpha" type="real">1.5707963267949</XPD:ATTR>
-<XPD:ATTR name="Distance" type="real">30</XPD:ATTR>
-<XPD:REF name="Model">/PBi8bYjmUKs3cqBLBsK9gAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="PropertyLabel" type="EdgeLabelView" guid="j2jrhFzKAk2TqAhPFNKd5QAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:ATTR name="Alpha" type="real">-1.5707963267949</XPD:ATTR>
-<XPD:ATTR name="Distance" type="real">15</XPD:ATTR>
-<XPD:REF name="Model">/PBi8bYjmUKs3cqBLBsK9gAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[5]" type="UMLNoteView" guid="Ks7PJikVxkKdWuekPiNqDQAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Left" type="integer">72</XPD:ATTR>
-<XPD:ATTR name="Top" type="integer">1028</XPD:ATTR>
-<XPD:ATTR name="Width" type="integer">735</XPD:ATTR>
-<XPD:ATTR name="Height" type="integer">428</XPD:ATTR>
-<XPD:ATTR name="Text" type="string">人人api调用类
-一、属性:
-$_config:sdk的配置,stdClass对象。
-$_postFields
-$_params:传递的参数,参考$config-&gt;APIMapping数组的值。
-$_currentMethod:当前请求的api方法名。
-$_sigKey:传递签名时使用的键名。
-$_sig:保存签名值。
-$_call_id:保存call id。
-$_session_key:保存session key。
-$_keyMapping:api请求中固定参数值(如api_key,v等)。
-
-二、方法:
-__construct:构造函数。
-GET:GET请求,参数1为人人api名,参数2为调用方法的参数值,参考$config-&gt;APIMapping数组的值。
-POST:同上。
-PUT:同上。
-DELETE:同上。
-generateSignature:生成签名值,将$_params和$keyMapping合并到一起用于签名,$_params属性在该方法中设置成所有请求参数的组合。
-paramsMerge:设置$_params属性值。
-setConfigToMapping:设置$_keyMapping属性值。
-setAPIURL:设置api服务器地址。
-getCallId:获取call id。
-setCallId:设置call id。
-getSessionKey:获取session key。
-getSessionKey:设置session key。
-isGotSessionKey:判断是否设置session key。
-isGotCallId:判断是否设置call id。
-</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[6]" type="UMLNoteLinkView" guid="fmqj0CeMJkyBSuH7kLBmWAAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Points" type="Points">355,1028;329,962</XPD:ATTR>
-<XPD:REF name="Head">44Kufrd59Eq6RD+03WoxmQAA</XPD:REF>
-<XPD:REF name="Tail">Ks7PJikVxkKdWuekPiNqDQAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[7]" type="UMLClassView" guid="TAYchqq90UigJphQyVzZ4QAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Left" type="integer">580</XPD:ATTR>
-<XPD:ATTR name="Top" type="integer">604</XPD:ATTR>
-<XPD:ATTR name="Width" type="integer">167</XPD:ATTR>
-<XPD:ATTR name="Height" type="integer">108</XPD:ATTR>
-<XPD:REF name="Model">ZySG9DbutU+zE10U9XCS1QAA</XPD:REF>
-<XPD:OBJ name="NameCompartment" type="UMLNameCompartmentView" guid="QAUdpcEKcEynzPLrGW5rPwAA">
-<XPD:OBJ name="NameLabel" type="LabelView" guid="zVkxdwsBYESEvm8uHVRDVwAA">
-<XPD:ATTR name="FontStyle" type="integer">1</XPD:ATTR>
-<XPD:ATTR name="Text" type="string">RenRenOauth</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="StereotypeLabel" type="LabelView" guid="ty/HK48bD0mltzdenmsAGQAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="PropertyLabel" type="LabelView" guid="ySpYjiR8JkKYqxTkDOzEQwAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="AttributeCompartment" type="UMLAttributeCompartmentView" guid="0auWSkXClkSDBYaOrLDp1wAA">
-<XPD:REF name="Model">ZySG9DbutU+zE10U9XCS1QAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="OperationCompartment" type="UMLOperationCompartmentView" guid="RaEMfJ4HuE6oHD6Uu3uvugAA">
-<XPD:REF name="Model">ZySG9DbutU+zE10U9XCS1QAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="TemplateParameterCompartment" type="UMLTemplateParameterCompartmentView" guid="pX1Gv/JTDUipIZNasBSQ0gAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:REF name="Model">ZySG9DbutU+zE10U9XCS1QAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[8]" type="UMLGeneralizationView" guid="CmtuZGwIUUOZgKnvXMrBSAAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Points" type="Points">642,604;620,549</XPD:ATTR>
-<XPD:REF name="Model">KTXw+LIE/ESJgMy/4p8gxgAA</XPD:REF>
-<XPD:REF name="Head">iehVS4s63UmAuqb/RA+XEwAA</XPD:REF>
-<XPD:REF name="Tail">TAYchqq90UigJphQyVzZ4QAA</XPD:REF>
-<XPD:OBJ name="NameLabel" type="EdgeLabelView" guid="hTPCSj0bGkKEtcvQcnD67gAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:ATTR name="Alpha" type="real">1.5707963267949</XPD:ATTR>
-<XPD:ATTR name="Distance" type="real">15</XPD:ATTR>
-<XPD:REF name="Model">KTXw+LIE/ESJgMy/4p8gxgAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="StereotypeLabel" type="EdgeLabelView" guid="GJmw/3KoykKGll+4y2oGAgAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:ATTR name="Alpha" type="real">1.5707963267949</XPD:ATTR>
-<XPD:ATTR name="Distance" type="real">30</XPD:ATTR>
-<XPD:REF name="Model">KTXw+LIE/ESJgMy/4p8gxgAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="PropertyLabel" type="EdgeLabelView" guid="FiJLeDHetEGlT4DQwPZjHgAA">
-<XPD:ATTR name="Visible" type="boolean">False</XPD:ATTR>
-<XPD:ATTR name="Alpha" type="real">-1.5707963267949</XPD:ATTR>
-<XPD:ATTR name="Distance" type="real">15</XPD:ATTR>
-<XPD:REF name="Model">KTXw+LIE/ESJgMy/4p8gxgAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[9]" type="UMLNoteView" guid="RrYji3FIIUGfhDdnEb/kMwAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Left" type="integer">580</XPD:ATTR>
-<XPD:ATTR name="Top" type="integer">776</XPD:ATTR>
-<XPD:ATTR name="Width" type="integer">323</XPD:ATTR>
-<XPD:ATTR name="Height" type="integer">143</XPD:ATTR>
-<XPD:ATTR name="Text" type="string">人人oauth授权类
-一、属性:
-$_config:sdk的配置,stdClass对象。
-
-二、方法:
-__construct
-getAuthorizeUrl:获取请求用户授权的url(跳转到该url)。
-getAccessToken:获取access token。
-getSessionKey:获取session key,用于请求api。
-</XPD:ATTR>
-</XPD:OBJ>
-<XPD:OBJ name="OwnedViews[10]" type="UMLNoteLinkView" guid="IcaVZVRGlki1tsyM/FUrfQAA">
-<XPD:ATTR name="LineColor" type="string">clMaroon</XPD:ATTR>
-<XPD:ATTR name="FillColor" type="string">$00B9FFFF</XPD:ATTR>
-<XPD:ATTR name="Points" type="Points">712,776;685,711</XPD:ATTR>
-<XPD:REF name="Head">TAYchqq90UigJphQyVzZ4QAA</XPD:REF>
-<XPD:REF name="Tail">RrYji3FIIUGfhDdnEb/kMwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:ATTR name="#OwnedElements" type="integer">5</XPD:ATTR>
-<XPD:OBJ name="OwnedElements[0]" type="UMLClass" guid="iJdV3jWW6kqjPrZmSwUpnwAA">
-<XPD:ATTR name="Name" type="string">RESTClient</XPD:ATTR>
-<XPD:REF name="Namespace">tIrBpqkk8EiNl/gQxibVOwAA</XPD:REF>
-<XPD:ATTR name="#Views" type="integer">4</XPD:ATTR>
-<XPD:REF name="Views[0]">iehVS4s63UmAuqb/RA+XEwAA</XPD:REF>
-<XPD:REF name="Views[1]">EEtvLuvj90aaW61EMRWkrAAA</XPD:REF>
-<XPD:REF name="Views[2]">Tqw3RTv4jESO64NJSE+1jQAA</XPD:REF>
-<XPD:REF name="Views[3]">m+4GrM/TOUu3szR2aBEkkQAA</XPD:REF>
-<XPD:ATTR name="#Specializations" type="integer">2</XPD:ATTR>
-<XPD:REF name="Specializations[0]">/PBi8bYjmUKs3cqBLBsK9gAA</XPD:REF>
-<XPD:REF name="Specializations[1]">KTXw+LIE/ESJgMy/4p8gxgAA</XPD:REF>
-<XPD:ATTR name="#Operations" type="integer">22</XPD:ATTR>
-<XPD:OBJ name="Operations[0]" type="UMLOperation" guid="t9E2tFBrIkW18RBWBJXOhQAA">
-<XPD:ATTR name="Name" type="string">__construct</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[1]" type="UMLOperation" guid="pfAwDv858EC+8cRcC/lVUQAA">
-<XPD:ATTR name="Name" type="string">call</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">6</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="4sbbQmwSjk2DVR4Qzrbw/wAA">
-<XPD:ATTR name="Name" type="string">$url</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">pfAwDv858EC+8cRcC/lVUQAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="l/yzSTbrGUmCk3psU0hFpwAA">
-<XPD:ATTR name="Name" type="string">$method</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">pfAwDv858EC+8cRcC/lVUQAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[2]" type="UMLParameter" guid="mE5RcgMMX0ihRwjmAKwljQAA">
-<XPD:ATTR name="Name" type="string">$postFields</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">pfAwDv858EC+8cRcC/lVUQAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[3]" type="UMLParameter" guid="vl/+Q4ET1k+9WOLMbW4rYAAA">
-<XPD:ATTR name="Name" type="string">$username</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">pfAwDv858EC+8cRcC/lVUQAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[4]" type="UMLParameter" guid="UUA9MnPZ7k2p/KBQp9fL5QAA">
-<XPD:ATTR name="Name" type="string">$password</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">pfAwDv858EC+8cRcC/lVUQAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[5]" type="UMLParameter" guid="F+CiZVQJTk+zvzUTLGtXDgAA">
-<XPD:ATTR name="Name" type="string">$contentType</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">pfAwDv858EC+8cRcC/lVUQAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[2]" type="UMLOperation" guid="Nk8oKXknKEqhxGXM6XXPfAAA">
-<XPD:ATTR name="Name" type="string">_POST</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">5</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="9bbyv7oAcES7YrKOB6gNZwAA">
-<XPD:ATTR name="Name" type="string">$url</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">Nk8oKXknKEqhxGXM6XXPfAAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="vEVjMDaDbU2f1dt+ewrI9QAA">
-<XPD:ATTR name="Name" type="string">$params</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">Nk8oKXknKEqhxGXM6XXPfAAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[2]" type="UMLParameter" guid="tx/hi1LkeUiti2rriy6pywAA">
-<XPD:ATTR name="Name" type="string">$username</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">Nk8oKXknKEqhxGXM6XXPfAAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[3]" type="UMLParameter" guid="rgv/Taqjtkq/a+RJYewL9gAA">
-<XPD:ATTR name="Name" type="string">$password</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">Nk8oKXknKEqhxGXM6XXPfAAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[4]" type="UMLParameter" guid="a5yOxQj5E0uTmXDwaG+QNQAA">
-<XPD:ATTR name="Name" type="string">$contentType</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">Nk8oKXknKEqhxGXM6XXPfAAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[3]" type="UMLOperation" guid="87GvySxLJkaYj5sHlmz+UwAA">
-<XPD:ATTR name="Name" type="string">_PUT</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">5</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="z1Xw2QYmmESCPCttWAPiRAAA">
-<XPD:ATTR name="Name" type="string">$url</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">87GvySxLJkaYj5sHlmz+UwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="0w0UiizM/UO9dG5HnvwjrQAA">
-<XPD:ATTR name="Name" type="string">$params</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">87GvySxLJkaYj5sHlmz+UwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[2]" type="UMLParameter" guid="ghNuaO6I/EORfOMW9reqUwAA">
-<XPD:ATTR name="Name" type="string">$username</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">87GvySxLJkaYj5sHlmz+UwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[3]" type="UMLParameter" guid="UksRWmFzRE+M8cdiFg7Q5AAA">
-<XPD:ATTR name="Name" type="string">$password</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">87GvySxLJkaYj5sHlmz+UwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[4]" type="UMLParameter" guid="VPGG6Dzb/EuF59qo3jdeXwAA">
-<XPD:ATTR name="Name" type="string">$contentType</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">87GvySxLJkaYj5sHlmz+UwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[4]" type="UMLOperation" guid="ENws+gB370uTIa9c3mUBsgAA">
-<XPD:ATTR name="Name" type="string">_GET</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">4</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="zJqJ1hN1GEausKhm6pu9NAAA">
-<XPD:ATTR name="Name" type="string">$url</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">ENws+gB370uTIa9c3mUBsgAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="g2DgDWB6iUS0iODIA+JmcQAA">
-<XPD:ATTR name="Name" type="string">$params</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">ENws+gB370uTIa9c3mUBsgAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[2]" type="UMLParameter" guid="CRIHU3ogj0emazh77g6p2AAA">
-<XPD:ATTR name="Name" type="string">$username</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">ENws+gB370uTIa9c3mUBsgAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[3]" type="UMLParameter" guid="9MiGjzKv/kmXWvYW2ygxOwAA">
-<XPD:ATTR name="Name" type="string">$password</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">ENws+gB370uTIa9c3mUBsgAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[5]" type="UMLOperation" guid="8H8OJIF1d0mEy8zBFFcPOwAA">
-<XPD:ATTR name="Name" type="string">_DELETE</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">4</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="2bSAnR5xtUuSpkqAB6LWmwAA">
-<XPD:ATTR name="Name" type="string">$url</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">8H8OJIF1d0mEy8zBFFcPOwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="QOD9Hm5O+ky7NT5jEgFutgAA">
-<XPD:ATTR name="Name" type="string">$params</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">8H8OJIF1d0mEy8zBFFcPOwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[2]" type="UMLParameter" guid="i5v9/ggUfEeIG/131WtsqQAA">
-<XPD:ATTR name="Name" type="string">$username</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">8H8OJIF1d0mEy8zBFFcPOwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[3]" type="UMLParameter" guid="r74pWGrBqE+f7bGdZoWwzAAA">
-<XPD:ATTR name="Name" type="string">$password</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">8H8OJIF1d0mEy8zBFFcPOwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[6]" type="UMLOperation" guid="r73Y3QT/UkGs+yyjh7nX2gAA">
-<XPD:ATTR name="Name" type="string">parseResponse</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">2</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="I8B1ZSXRt0CDNPIoVh6ziQAA">
-<XPD:ATTR name="Name" type="string">$resp</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">r73Y3QT/UkGs+yyjh7nX2gAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="9TA/ErlEOUa3UI+kYYY4FwAA">
-<XPD:ATTR name="Name" type="string">$ext</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">''</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">r73Y3QT/UkGs+yyjh7nX2gAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[7]" type="UMLOperation" guid="Lu9v2/oYoUKTur4FPjpWfwAA">
-<XPD:ATTR name="Name" type="string">static function xml_decode</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">2</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="YEc6VU+68ku7uzfO9qI1qwAA">
-<XPD:ATTR name="Name" type="string">$data</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">Lu9v2/oYoUKTur4FPjpWfwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="gWw0iqoyk0GSrqzDJwYwCAAA">
-<XPD:ATTR name="Name" type="string">$toArray</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">false</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">Lu9v2/oYoUKTur4FPjpWfwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[8]" type="UMLOperation" guid="9W84/p0TUECdjAJ3czd8AQAA">
-<XPD:ATTR name="Name" type="string">static function objectToArray</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="pfAJPoEyJUWzF1aOy2XGFAAA">
-<XPD:ATTR name="Name" type="string">$obj</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">9W84/p0TUECdjAJ3czd8AQAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[9]" type="UMLOperation" guid="Ca6Kw66rp0WhNFnlkLiTiAAA">
-<XPD:ATTR name="Name" type="string">get_http_url</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[10]" type="UMLOperation" guid="vn+BBUAU9USmwhM75YuSSQAA">
-<XPD:ATTR name="Name" type="string">to_url</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[11]" type="UMLOperation" guid="JKHZUtJQaEWV5ZjPcVWkmQAA">
-<XPD:ATTR name="Name" type="string">to_postdata</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[12]" type="UMLOperation" guid="u9ZSeLeQREGdczrr+aj16AAA">
-<XPD:ATTR name="Name" type="string">setNotFollow</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[13]" type="UMLOperation" guid="jw9BR+i8kEK7kVBfkU0XIQAA">
-<XPD:ATTR name="Name" type="string">close</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[14]" type="UMLOperation" guid="jWYesCPWxUmrmozqHiGCcwAA">
-<XPD:ATTR name="Name" type="string">setURL</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="C0cUreYjp02ayCUCyC8j2QAA">
-<XPD:ATTR name="Name" type="string">$url</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">jWYesCPWxUmrmozqHiGCcwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[15]" type="UMLOperation" guid="negjlHAKrE6j7kc1bDLh8gAA">
-<XPD:ATTR name="Name" type="string">setFormat</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="EHzHCFaTx0OEIUyMK0pL7wAA">
-<XPD:ATTR name="Name" type="string">$format</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">negjlHAKrE6j7kc1bDLh8gAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[16]" type="UMLOperation" guid="2wxgpR2f90WX2GDSOdSFkgAA">
-<XPD:ATTR name="Name" type="string">setDecodeFormat</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="jZKOL2/wWU2RhtqGcia/6AAA">
-<XPD:ATTR name="Name" type="string">$format</XPD:ATTR>
-<XPD:ATTR name="DefaultValue" type="string">null</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">2wxgpR2f90WX2GDSOdSFkgAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[17]" type="UMLOperation" guid="wIpn0zi9lkShWwu8lDychAAA">
-<XPD:ATTR name="Name" type="string">setContentType</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="BH6eaNdB6U+it4x9vafGWwAA">
-<XPD:ATTR name="Name" type="string">$contentType</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">wIpn0zi9lkShWwu8lDychAAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[18]" type="UMLOperation" guid="X7sgSBhsIkGfSQ2o1lkhfgAA">
-<XPD:ATTR name="Name" type="string">setAuthorizeInfo</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">2</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="r/wxD6yRe0yMlQfrKn6dVgAA">
-<XPD:ATTR name="Name" type="string">$username</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">X7sgSBhsIkGfSQ2o1lkhfgAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="xeldNVf4a068J2IRWtZIEgAA">
-<XPD:ATTR name="Name" type="string">$password</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">X7sgSBhsIkGfSQ2o1lkhfgAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[19]" type="UMLOperation" guid="kWdza1Mxzkqi8KaEq7/H8QAA">
-<XPD:ATTR name="Name" type="string">setMethod</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="etIVNEkTaEecjF29RGAQQAAA">
-<XPD:ATTR name="Name" type="string">$method</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">kWdza1Mxzkqi8KaEq7/H8QAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[20]" type="UMLOperation" guid="LmBMagfGfUeLOVDNgeLGFgAA">
-<XPD:ATTR name="Name" type="string">setParameters</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">1</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="ArOteA0dOU+IzVZxKStmEgAA">
-<XPD:ATTR name="Name" type="string">$params</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">LmBMagfGfUeLOVDNgeLGFgAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:OBJ name="Operations[21]" type="UMLOperation" guid="/qazl6/tREmfiorjWt5gjwAA">
-<XPD:ATTR name="Name" type="string">getHeader</XPD:ATTR>
-<XPD:REF name="Owner">iJdV3jWW6kqjPrZmSwUpnwAA</XPD:REF>
-<XPD:ATTR name="#Parameters" type="integer">2</XPD:ATTR>
-<XPD:OBJ name="Parameters[0]" type="UMLParameter" guid="qjm+XIu7Q0OszQtaZp26zgAA">
-<XPD:ATTR name="Name" type="string">$ch</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">/qazl6/tREmfiorjWt5gjwAA</XPD:REF>
-</XPD:OBJ>
-<XPD:OBJ name="Parameters[1]" type="UMLParameter" guid="0nKk9o28ZEqlTu/nA2bRwwAA">
-<XPD:ATTR name="Name" type="string">$header</XPD:ATTR>
-<XPD:REF name="BehavioralFeature">/qazl6/tREmfiorjWt5gjwAA</XPD:REF>
-</XPD:OBJ>
-</XPD:OBJ>
-<XPD:ATTR name="#Attributes" type="integer">17</XPD:ATTR>
-<XPD:OBJ name="Attributes[0]" type="UMLAttribute" guid="iO0sDXfwh0eBOavhzd3cogAA">