ibunao
你找一下
mdm\admin\models\Route
类下的getAppRoutes
方法,看一下就知道了
controller是通过遍历目录控制器目录找到的
action是通过控制器的反射类找到的$class = new \ReflectionClass($controller); foreach ($class->getMethods() as $method) { $name = $method->getName(); if ($method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0 && $name !== 'actions') { $name = strtolower(preg_replace('/(?<![A-Z])[A-Z]/', ' \0', substr($name, 6))); $id = $prefix . ltrim(str_replace(' ', '-', $name), '-'); $result[$id] = $id; } }
- ibunao 2017-05-09 已签到连续签到1天,获得了5个金钱
- ibunao 2017-01-05 已签到连续签到1天,获得了5个金钱