Constants

CHAT_KEY

CHAT_KEY = 'uidChatMap'

DBNAME

DBNAME = 'longer'

GLOBAL_START

GLOBAL_START = 1

HOST

HOST = '127.0.0.1'

LARAVEL_START

LARAVEL_START = microtime(true)

PASSWORD

PASSWORD = '123456789'

PORT

PORT = '3306'

REDIS_KEY

REDIS_KEY = 'uidConnectionMap'

USERNAME

USERNAME = 'root'

Functions

addFileToZip()

addFileToZip(  $path, \ZipArchive  $zip) : array

todo:zip文件压缩

Parameters

$path
\ZipArchive $zip

Returns

array —

| bool

ajaxReturn()

ajaxReturn(array  $data = array(), integer  $code = 200) : \Illuminate\Http\JsonResponse

todo:返回JSON数据

Parameters

array $data
integer $code

Returns

\Illuminate\Http\JsonResponse

chmodFile()

chmodFile(  $filepath) : boolean|string

todo:获取权限

Parameters

$filepath

Returns

boolean|string

createFile()

createFile(  $filepath) : boolean

todo:保存文件

Parameters

$filepath

Returns

boolean —

| array

cuttingFile()

cuttingFile(string  $filename, string  $block = '1024') : boolean

todo:文件的分割

Parameters

string $filename

文件名

string $block

文件分割大小

Returns

boolean —

| array

emptyDir()

emptyDir(  $path) : boolean

判断目录是否为空

Parameters

$path

Returns

boolean —

| array

formatBates()

formatBates(String  $size, string  $delimiter = '') : string

todo:大小格式转换

Parameters

String $size
string $delimiter

分割符

Returns

string —

| array

getCityCode()

getCityCode() : boolean|mixed|string

todo:获取城市CODE

Returns

boolean|mixed|string

getFileContent()

getFileContent(  $filepath) : array

todo: 文件读取

Parameters

$filepath

Returns

array —

| string

getFileLists()

getFileLists(  $filePath, array  $permissionFile = array(), integer  $sort_order = SORT_ASC) : array

todo:获取文件列表

Parameters

$filePath
array $permissionFile
integer $sort_order

Returns

array

getFilePath()

getFilePath(  $path,   $basename) : false|string

todo:文件路径

Parameters

$path
$basename

Returns

false|string

getLogCount()

getLogCount() : array

TODO:获取日志信息

Returns

array

getOauthCount()

getOauthCount() : array

TODO:获取授权用户

Returns

array

getPushCount()

getPushCount() : array

TODO:获取站内通知

Returns

array

getRoundNum()

getRoundNum(  $length,   $type) : string

TODO:生成随机字符串

Parameters

$length
$type

Returns

string

getServerIp()

getServerIp() : array|false|string

todo:获取服务器ip地址

Returns

array|false|string

getTree()

getTree(array  $data,   $pid, string  $attr = 'data', string  $pidAttr = 'pid') : array

todo: 树形结构

Parameters

array $data
$pid
string $attr
string $pidAttr

Returns

array

gZipFile()

gZipFile(array  $docLists, string  $zipProductPath, string  $filename) : boolean

todo:文件压缩

Parameters

array $docLists

文件列表

string $zipProductPath

文件路径

string $filename

文件名

Returns

boolean —

| array

mergerFile()

mergerFile(  $targetFile,   $filePath) : array

合并文件

Parameters

$targetFile
$filePath

Returns

array —

| true

pushData()

pushData(  $user) : mixed

TODO:获取站内通知

Parameters

$user

Returns

mixed

removeFiles()

removeFiles(  $path) : boolean

删除文件

Parameters

$path

Returns

boolean —

| array

renameFile()

renameFile(  $oldFile,   $newFile) : boolean

todo:文件重命名

Parameters

$oldFile
$newFile

Returns

boolean —

| array

saveLog()

saveLog(  $form) : array

todo:日志保存

Parameters

$form

Returns

array —

| bool

setCode()

setCode(  $code) 

todo: 发送HTTP状态

Parameters

$code

unGZipFile()

unGZipFile(string  $path, string  $resource = '', boolean  $removeResource = false) : boolean

todo:文件解压

Parameters

string $path

文件路径

string $resource

解压包文件名称

boolean $removeResource

Returns

boolean —

| array

validatePost()

validatePost(  $post,   $rules, array  $message = array()) : void

todo:错误信息输出

Parameters

$post
$rules
array $message

webPush()

webPush(  $content, string  $uid = '') : boolean

TODO:站内消息推送

Parameters

$content
string $uid

Returns

boolean —

| array

writeFile()

writeFile(  $filepath,   $content) : integer

todo:文件写入

Parameters

$filepath
$content

Returns

integer —

| array