Properties

$app

$app : \think\App

应用实例

Type

\think\App

$url

$url : 

Type

$apiUrl

$apiUrl : 

Type

$itemId

$itemId : 

Type

$dytk

$dytk : 

Type

$contents

$contents : 

Type

$backtrack

$backtrack : 

Type

$storage

$storage : 

Type

$storagePath

$storagePath : 

Type

Methods

__construct()

__construct(\think\App  $app) 

Service constructor.

Parameters

\think\App $app

instance()

instance(array  $args) : static

静态实例对象

Parameters

array $args

Returns

static

url()

url(  $str) : $this

配置网址

Parameters

$str

Throws

\DtApp\ThinkLibrary\exception\DtaException

Returns

$this

storage()

storage(string  $type, string  $path) : $this

云存储

Parameters

string $type
string $path

Returns

$this

getAuthorInfo()

getAuthorInfo() : string

获取作者信息

Returns

string

getShareInfo()

getShareInfo() : string

获取分享信息

Returns

string

getMusicInfo()

getMusicInfo() : string

获取音乐信息

Returns

string

getVideoInfo()

getVideoInfo() : string

获取视频信息

Returns

string

getApi()

getApi() : $this

获取接口全部信息

Returns

$this

getAll()

getAll() : $this

获取全部信息

Throws

\Exception

Returns

$this

toArray()

toArray() : array|mixed

返回Array

Returns

array|mixed

toObject()

toObject() : object|string|mixed

返回Object

Returns

object|string|mixed

initialize()

initialize() : $this

初始化服务

Returns

$this

getContents()

getContents(  $url) : boolean|string

获取

Parameters

$url

Returns

boolean|string

judgeUrl()

judgeUrl(  $url) : string

判断网址是否确认

Parameters

$url

Returns

string

getItemId()

getItemId(  $content) : mixed

正则匹配 mid

Parameters

$content

Throws

\DtApp\ThinkLibrary\exception\DtaException

Returns

mixed

getDyTk()

getDyTk(  $content) : mixed

正则匹配 dytk

Parameters

$content

Throws

\DtApp\ThinkLibrary\exception\DtaException

Returns

mixed

cAuthorAvatar()

cAuthorAvatar(  $data) : string

处理作者头像 大到小

Parameters

$data

Returns

string

cMusicAvatar()

cMusicAvatar(  $data) : string

处理音乐作者头像 大到小

Parameters

$data

Returns

string

cVideoAvatar()

cVideoAvatar(  $data) : array

处理视频封面 大到小

Parameters

$data

Returns

array

cVideoPlayUrl()

cVideoPlayUrl(  $url,   $type) : mixed

返回302网址

Parameters

$url
$type

Returns

mixed