\DtApp\ThinkLibrary\service\curlBtService

宝塔网络请求接口 https://www.bt.cn/ Class BtService

Summary

Methods
Properties
Constants
__construct()
instance()
key()
panel()
url()
cookie()
timeout()
data()
toArray()
No public properties found
No constants found
initialize()
$app
N/A
http()
getKeyData()
$url
$key
$panel
$output
$cookie
$data
$timeout
N/A

Properties

$app

$app : \think\App

应用实例

Type

\think\App

$url

$url : 

Type

$key

$key : 

Type

$panel

$panel : 

Type

$output

$output : 

Type

$cookie

$cookie : 

Type

$data

$data : array

Type

array

$timeout

$timeout : integer

Type

integer

Methods

__construct()

__construct(\think\App  $app) 

Service constructor.

Parameters

\think\App $app

instance()

instance(array  $args) : static

静态实例对象

Parameters

array $args

Returns

static

key()

key(string  $str) : $this

配置宝塔密钥

Parameters

string $str

Returns

$this

panel()

panel(string  $str) : $this

配置宝塔网址

Parameters

string $str

Returns

$this

url()

url(string  $str) : $this

配置网址

Parameters

string $str

Returns

$this

cookie()

cookie(string  $str) : $this

认证内容

Parameters

string $str

Returns

$this

timeout()

timeout(integer  $int) : $this

超时,默认60s

Parameters

integer $int

Returns

$this

data()

data(array  $array) : $this

数据

Parameters

array $array

Returns

$this

toArray()

toArray(boolean  $is = true) : array|boolean|mixed|string

返回数组数据

Parameters

boolean $is

Returns

array|boolean|mixed|string

initialize()

initialize() : $this

初始化服务

Returns

$this

http()

http() : $this

发起请求

Returns

$this

getKeyData()

getKeyData() : array

构造带有签名的关联数组

Returns

array