add clear
This commit is contained in:
@@ -107,6 +107,27 @@ class Config
|
||||
*/
|
||||
private $key = '';
|
||||
private $access_token = '';
|
||||
private $agent = '';
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAgent(): string
|
||||
{
|
||||
return $this->agent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $agent
|
||||
* @return Config
|
||||
*/
|
||||
public function setAgent(string $agent): Config
|
||||
{
|
||||
$this->agent = $agent;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
|
||||
@@ -29,6 +29,7 @@ abstract class Miniprogarampage
|
||||
$this->request = new WxClient();
|
||||
}
|
||||
$this->request->setIsSSL(true);
|
||||
$this->request->setAgent($this->config->getAgent());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user