- Timestamp:
- 07/15/08 00:05:41 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/php/Diggin_Service_Wedata/library/Diggin/Service/Wedata.php
r11313 r15815 38 38 const PATH_UPDATE_ITEM = '/items/%s'; //item id 39 39 const PATH_DELETE_ITEM = '/items/%s'; //item id 40 41 /**40 41 /** 42 42 * Zend_Http_Client Object 43 43 * … … 54 54 * Constructs a new Wedata Web Service Client 55 55 * 56 * @param 56 * @param array $params parameter acording Wedata 57 57 * @param boolean | string @see Zend_Json 58 * @return void58 * @return null 59 59 */ 60 60 public function __construct(array $params = null, $decodetype = null) … … 68 68 if (self::$_decodetype === false) { 69 69 //nothig to do 70 } else if (self::$_decodetype === null){70 } else { 71 71 require_once 'Zend/Json.php'; 72 $value = Zend_Json::decode($value, Zend_Json::TYPE_ARRAY); 73 } else { 74 $value = Zend_Json::decode($value, self::$_decodetype); 72 if (self::$_decodetype === null) { 73 $value = Zend_Json::decode($value, Zend_Json::TYPE_ARRAY); 74 } else { 75 $value = Zend_Json::decode($value, self::$_decodetype); 76 } 75 77 } 76 78 … … 114 116 * adding parameter 115 117 * 116 * @param string 117 * @param string 118 * @param string $key 119 * @param string $value 118 120 */ 119 121 public static function setParamDatabase($key, $value) … … 147 149 * adding parameter 148 150 * 149 * @param string 150 * @param string 151 * @param string $itemId 151 152 */ 152 153 public static function setItemId($itemId) … … 156 157 157 158 /** 159 * Handles all requests to a web service 160 * 158 161 * @param string path 159 162 * @param string Prease,using Zend_Http_Client's const 160 * 163 * @return mixed 161 164 */ 162 165 public static function makeRequest($path, $method, array $params = null) … … 284 287 if (isset(self::$_params['page'])) { 285 288 $params = array('page' => self::$_params['page']); 289 } else { 290 $params = null; 286 291 } 287 292 … … 294 299 /** 295 300 * 296 * @param string 297 * 301 * @param string $itemId 302 * @param string $page 303 * @return array Decording Result 298 304 */ 299 305 public static function getItem($itemId = null, $page = null) 300 306 { 307 //@todo if int set as itemid or string searching itemid by name 308 //is_integer($item); 309 //is_string($item) ; 310 301 311 if ($itemId) self::setItemId($itemId); 302 312 if ($page) self::setParam('page', $page);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)