|
Lumen 快速开发工具包
v1.2.2
|
Transformer 通用类 更多...


Public 成员函数 | |
| __construct (ParamBag $params=null) | |
| transform ($models) | |
| 过滤处理 | |
| hide (array $fields) | |
| 隐藏字段处理 | |
| show (array $fields) | |
| 只显示字段处理 | |
Protected 成员函数 | |
| withParamBagShow (ParamBag $params=null) | |
| include 中字段显示过滤处理 @detail URI:xxxx?include=xx:show(field|field|field):hide(field|field|field) 更多... | |
| withFilterFields (array $array) | |
| include 中字段显示过滤数组处理 更多... | |
| withParamLimit (ParamBag $params=null) | |
| include 中 limit 处理 @detail URI:xxxx?include=xx:limit(10) | |
| withParamOrderFilter ($relations, ParamBag $params=null) | |
| include 中 where 和 order 处理 @detail URI:xxxx?include=xx:order(id|desc):where(id|>|2) | |
Protected 属性 | |
| $withHideFields = [] | |
| 默认隐藏字段 | |
| $withShowFields = [] | |
| 默认只显示字段 | |
| $withParamLimit = 10 | |
| 默认 include 条数 | |
| $withParamOrder = ['id', 'desc'] | |
| 默认 include 排序 | |
Transformer 通用类
|
protected |
|
protected |
include 中字段显示过滤处理 @detail URI:xxxx?include=xx:show(field|field|field):hide(field|field|field)
| $params | include 中的参数 |
引用了 BaseTransformer\hide() , 以及 BaseTransformer\show().
