Changeset 418 for pro-violet-viettel/sourcecode/application/libraries
- Timestamp:
- Nov 5, 2014 11:52:12 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/libraries/vservices.php
r417 r418 7 7 private $_userId; 8 8 private $_password; 9 10 private $_httpUser; 11 private $_httpPasswd; 9 12 10 13 public function __construct() { … … 41 44 * @param unknown $aryParams 42 45 */ 46 43 47 public function actionExecute ($action, $aryParams = array(), $module = 'space') { 44 $this->_curlObj->create($this->_apiUrl. $module .'/'.$action);48 $this->_curlObj->create($this->_apiUrl. $module .'/'.$action); 45 49 $this->_curlObj->option(CURLOPT_BUFFERSIZE, 10); 46 50 $this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10)); 47 51 52 if ($this->_httpUser && $this->_httpPasswd) { 53 $this->_curlObj->http_login($this->_httpUser, $this->_httpPasswd); 54 } 55 48 56 if ($this->_userId) $aryParams['userid'] = $this->_userId; 49 $this->_curlObj->post($aryParams);57 if (count($aryParams) > 0) $this->_curlObj->post($aryParams); 50 58 return $this->_curlObj->execute(); 51 } 52 59 } 60 61 62 53 63 public function __destruct() { 54 64
Note: See TracChangeset
for help on using the changeset viewer.