mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
改进写法
This commit is contained in:
@@ -36,9 +36,8 @@ class Controller
|
|||||||
}
|
}
|
||||||
// 前置操作方法
|
// 前置操作方法
|
||||||
// 支持 ['action1','action2'] 或者 ['action1'=>['only'=>'index'],'action2'=>['except'=>'login']]
|
// 支持 ['action1','action2'] 或者 ['action1'=>['only'=>'index'],'action2'=>['except'=>'login']]
|
||||||
$list = $this->beforeActionList;
|
if ($this->beforeActionList) {
|
||||||
if ($list) {
|
foreach ($this->beforeActionList as $method => $options) {
|
||||||
foreach ($list as $method => $options) {
|
|
||||||
is_numeric($method) ?
|
is_numeric($method) ?
|
||||||
$this->beforeAction($options) :
|
$this->beforeAction($options) :
|
||||||
$this->beforeAction($method, $options);
|
$this->beforeAction($method, $options);
|
||||||
|
|||||||
Reference in New Issue
Block a user