淘宝API接口
淘宝API标准接口 protected $taobaoData; private $_userParam = array(); private $_errorInfo; /** * @var Taoapi_Util */ public static $Taoapi_Util; /** * @var Taoapi_Config */ public $ApiConfig; /** * @var Taoapi_Cache */ public $Cache; private $_ArrayModeData; public function __construct () { if (self::$Taoapi_Util == NULL) { self::$Taoapi_Util = new Taoapi_Util(); } $Config = Taoapi_Config::Init(); $this->ApiConfig = $Config->getConfig(); $this->Cache = new Taoapi_Cache(); $this->Cache->setClearCache($this->ApiConfig->ClearCache); } public function __set ($name, $value) { if ($this->taobaoData && $this->ApiConfig->AutoRestParam) { $this->_userParam = array(); $this->taobaoData = null; } $this->_userParam[$name] = $value; } public function setUserParam($userParam) { $this->_userParam = $userParam; } public function __get ($name) { if (! empty($this->_userParam[$name])) { return $this->_userParam[$name]; } } public function __unset ($name) { unset($this->_userParam[$name]); }