\Core\ServicesAttachmentService

AttachmentService 附件服务

Summary

Methods
Properties
Constants
__get()
getBusinessContainerInstance()
getModelInstance()
getServiceInstance()
getList()
getPagesInfo()
getInfo()
getAttachmentFullUrl()
newFileName()
addAttachment()
saveAttachment()
deleteInfo()
$attachmentModel
No constants found
No protected methods found
$container
$businessContainerKey
N/A
No private methods found
No private properties found
N/A

Properties

$attachmentModel

$attachmentModel : \App\Models\Attachment

Type

\App\Models\Attachment

$container

$container : \Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface

$businessContainerKey

$businessContainerKey : 

Created by PhpStorm.

可以实现自动注入的业务容器 User:YM Date:2020/1/12 Time:上午8:18

Type

Methods

__get()

__get(  $key) : \Psr\Container\ContainerInterface|void

__get 隐式注入服务类 User:YM Date:2019/11/21 Time:上午9:27

Parameters

$key

Returns

\Psr\Container\ContainerInterface|void

getBusinessContainerInstance()

getBusinessContainerInstance(  $key) : mixed

getBusinessContainerInstance 获取业务容器实例 User:YM Date:2020/1/12 Time:上午8:15

Parameters

$key

Returns

mixed

getModelInstance()

getModelInstance(  $key) : mixed

getModelInstance 获取数据模型类实例 User:YM Date:2019/11/21 Time:上午10:30

Parameters

$key

Returns

mixed

getServiceInstance()

getServiceInstance(  $key) : mixed

getServiceInstance 获取服务类实例 User:YM Date:2019/11/21 Time:上午10:30

Parameters

$key

Returns

mixed

getList()

getList(array  $where = array(), array  $order = array(), integer  $offset, integer  $limit) : mixed

getList 条件获取友情链接列表 User:YM Date:2020/2/10 Time:下午10:34

Parameters

array $where

查询条件

array $order

排序条件

integer $offset

偏移

integer $limit

条数

Returns

mixed

getPagesInfo()

getPagesInfo(array  $where = array()) : mixed

getPagesInfo 获取分页信息 User:YM Date:2020/2/10 Time:下午10:35

Parameters

array $where

Returns

mixed

getInfo()

getInfo(  $id) : \App\Models\BaseModel|array|\Hyperf\Database\Model\Model|null

getInfo 获取附件信息 User:YM Date:2020/2/5 Time:下午8:59

Parameters

$id

Returns

\App\Models\BaseModel|array|\Hyperf\Database\Model\Model|null

getAttachmentFullUrl()

getAttachmentFullUrl(  $path) : string

getAttachmentFullUrl 获取附件全路径 User:YM Date:2020/2/5 Time:下午9:21

Parameters

$path

相对路径包含文件名

Returns

string

newFileName()

newFileName() : mixed|null|string|array<mixed,string>

newFileName 生成一个文件名,不包含后缀 User:YM Date:2020/2/6 Time:下午8:54

Returns

mixed|null|string|array<mixed,string>

addAttachment()

addAttachment(mixed  $userId) : void

addAttachment 添加附件

Parameters

mixed $userId

saveAttachment()

saveAttachment(  $inputData) : null

saveAttachment 保存附件信息 User:YM Date:2020/2/7 Time:下午8:11

Parameters

$inputData

Returns

null

deleteInfo()

deleteInfo(  $id) : mixed

deleteInfo 根据id删除信息 User:YM Date:2020/2/10 Time:下午10:35

Parameters

$id

Returns

mixed