public function __construct()
 {
     $this->httpClient = Http::getClient();
 }
示例#2
0
 protected static function getHttpClient()
 {
     if (!isset(self::$client)) {
         self::$client = Http::getClient();
     }
     self::$client->timeout = 10;
     return self::$client;
 }