前端用户中心功能完善
This commit is contained in:
@@ -243,33 +243,4 @@ class Base extends BaseC {
|
||||
View::assign('extend_menu', array('管理插件' => $menu));
|
||||
}
|
||||
}
|
||||
|
||||
protected function getCurrentTitle() {
|
||||
$mate = '';
|
||||
$controller = strtr(strtolower($this->request->controller()), '.', '\\');
|
||||
$action = $this->request->action();
|
||||
$class = "\\app\\controller\\" . $controller;
|
||||
if (class_exists($class)) {
|
||||
$reflection = new \ReflectionClass($class);
|
||||
$group_doc = $this->Parser($reflection->getDocComment());
|
||||
if(isset($group_doc['title'])){
|
||||
$mate = $group_doc['title'];
|
||||
}
|
||||
$method = $reflection->getMethods(\ReflectionMethod::IS_FINAL | \ReflectionMethod::IS_PUBLIC);
|
||||
foreach ($method as $key => $v) {
|
||||
if($action == $v->name){
|
||||
$title_doc = $this->Parser($v->getDocComment());
|
||||
if(isset($title_doc['title'])){
|
||||
$mate = $title_doc['title'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $mate;
|
||||
}
|
||||
|
||||
protected function Parser($text) {
|
||||
$doc = new \doc\Doc();
|
||||
return $doc->parse($text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user