Toggle navigation
Toggle navigation
This project
Loading...
Sign in
qingger
/
allProject
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
shipengfei
2017-03-30 14:20:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c1a664511b5d4be8e74002dddea87edf19dc5c19
c1a66451
1 parent
87313526
Update lumen_rule_controller.md
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
Docs/Rules/lumen_rule_controller.md
Docs/Rules/lumen_rule_controller.md
View file @
c1a6645
...
...
@@ -144,27 +144,27 @@
*
Controller层的处理只作出正常的返回处理,而不对异常情况进行返回,遇到异常情况时,通过Exception的机制进行数据的返回。
```
php
public function dosth() {
```
php
public function dosth() {
dosth1();
dosth2();
if($error) {
throw new MYException('Error Message',SOMECODE);
}
$this->respond([..]);
}
```
}
```
*
BasicController,BaseModel有UtilToolMethods的相关方法,实现了以下的基本功能
| 索引 | 方法名 | 备注 |
| ---- | --------------- | ---------------------------------- |
| 1 | arrValidate | 实现以数组字典数据的验证 |
| 2 | dispatchJob | 派发事件 |
| 3 | utilToArray | 将对象转换为数组 |
| 4 | getConfigValue | 获得配置文件中的值 |
| 5 | arrayEncode | 将字典Hash成一个字符串,一般用来实现CacheKey |
| 6 | getEnv | 获得环境变量名称: 有dev/testing/production/ |
| 7 | envIsTesting | 判断环境是否测试环境 |
| 8 | envIsDemo | 判断环境是否环境 |
| 9 | envIsProduction | 判断环境是否生产环境 |
| 索引 | 方法名 | 备注 |
| ---- | --------------- | ---------------------------------- |
| 1 | arrValidate | 实现以数组字典数据的验证 |
| 2 | dispatchJob | 派发事件 |
| 3 | utilToArray | 将对象转换为数组 |
| 4 | getConfigValue | 获得配置文件中的值 |
| 5 | arrayEncode | 将字典Hash成一个字符串,一般用来实现CacheKey |
| 6 | getEnv | 获得环境变量名称: 有dev/testing/production/ |
| 7 | envIsTesting | 判断环境是否测试环境 |
| 8 | envIsDemo | 判断环境是否环境 |
| 9 | envIsProduction | 判断环境是否生产环境 |
...
...
Please
register
or
login
to post a comment