|
本帖最后由 kao10324 于 2017-9-15 16:27 编辑
libraries里的一个类库;$this->load->library('ebay');
我想初始化传递如下参数.应该怎样写..
或者说这个类库怎么创建实例化new Ebay($userToken, $devID, $appID, $certID, $serverUrl, $compatabilityLevel, $siteID, $verb);
class Ebay{
private $requestToken;
private $devID;
private $appID;
private $certID;
private $serverUrl;
private $compatLevel;
private $siteID;
private $verb;
public function __construct($userRequestToken, $developerID, $applicationID, $certificateID, $serverUrl, $compatabilityLevel, $siteToUseID, $callName)
{
$this->requestToken = $userRequestToken;
$this->devID = $developerID;
$this->appID = $applicationID;
$this->certID = $certificateID;
$this->compatLevel = $compatabilityLevel;
$this->siteID = $siteToUseID;
$this->verb = $callName;
$this->serverUrl = $serverUrl;
}
}
这样写反馈不正常
$config = array(
"userRequestToken" => "requestToken",
"developerID" => "requestToken",
"applicationID" => "requestToken",
"certificateID" => "requestToken",
"serverUrl" => "requestToken",
"compatabilityLevel" => "requestToken",
"siteToUseID" => "requestToken",
"callName" => "requestToken",
);
$this->load->library("Ebays",$config);
|
|