add clear
This commit is contained in:
@@ -111,6 +111,25 @@ class Config
|
|||||||
private $key = '';
|
private $key = '';
|
||||||
private $access_token = '';
|
private $access_token = '';
|
||||||
private $agent = '';
|
private $agent = '';
|
||||||
|
private $usrSwoole = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isUsrSwoole(): bool
|
||||||
|
{
|
||||||
|
return $this->usrSwoole;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $usrSwoole
|
||||||
|
* @return Config
|
||||||
|
*/
|
||||||
|
public function setUsrSwoole(bool $usrSwoole): Config
|
||||||
|
{
|
||||||
|
$this->usrSwoole = $usrSwoole;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ abstract class Miniprogarampage implements Progaram
|
|||||||
}
|
}
|
||||||
static::$instance->config = $config;
|
static::$instance->config = $config;
|
||||||
static::$instance->request->setAgent($config->getAgent());
|
static::$instance->request->setAgent($config->getAgent());
|
||||||
|
if ($config->isUsrSwoole()) {
|
||||||
|
static::$instance->request->setUseSwoole(true);
|
||||||
|
}
|
||||||
|
|
||||||
$request = static::$instance->request;
|
$request = static::$instance->request;
|
||||||
if ($request->getIsSSL()) {
|
if ($request->getIsSSL()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user