# Zhamao Framework: Route类 参考

Route类 参考
类 Route 继承关系图:
[图例]
Route 的协作图:
[图例]

## Public 成员函数

| __construct (public $route, public $name='', public $request_method=['GET', 'POST'], public $params=[])
Public 成员函数 继承自 AnnotationBase
| __toString ()
| on (\Closure|callable|string $method)
| getIterator ()
| isInGroup (string $name)
| addGroup (string $name)
| getGroups ()

## 静态 Public 成员函数

static | make ($route, $name='', $request_method=['GET', 'POST'], $params=[])

## 额外继承的成员函数

成员变量 继承自 AnnotationBase
Closure string array | $method = ''
| $class = ''
array | $group = []

## 详细描述

Class RequestMapping @Annotation @NamedArgumentConstructor() @Target("METHOD")

## 构造及析构函数说明

## __construct()

__construct | ( | public | $route,
|  | public | $name = `''`,
|  | public | $request_method = `['GET'`,
|  | 'POST'] | ,
|  | public | $params = `[]`
| ) |  |

参数

  $route | @Required()
  $params | Routing path params binding. eg. {"id"="\d+"}

## 成员函数说明

## make()

static make | ( |  | $route,
|  |  | $name = `''`,
|  |  | $request_method = `['GET'`,
|  | 'POST'] | ,
|  |  | $params = `[]`
| ) |  |

static

该类的文档由以下文件生成:

- src/ZM/Annotation/Http/Route.php