mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
39 lines
678 B
PHP
39 lines
678 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
namespace ZM\Annotation\Http;
|
||
|
|
|
||
|
|
use Doctrine\Common\Annotations\Annotation\Required;
|
||
|
|
use Doctrine\Common\Annotations\Annotation\Target;
|
||
|
|
use ZM\Annotation\AnnotationBase;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Class RequestMapping
|
||
|
|
* @Annotation
|
||
|
|
* @Target("ALL")
|
||
|
|
* @package ZM\Annotation\Http
|
||
|
|
*/
|
||
|
|
class RequestMapping extends AnnotationBase
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @var string
|
||
|
|
* @Required()
|
||
|
|
*/
|
||
|
|
public $route = '';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
public $name = '';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @var array
|
||
|
|
*/
|
||
|
|
public $request_method = [RequestMethod::GET, RequestMethod::POST];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Routing path params binding. eg. {"id"="\d+"}
|
||
|
|
* @var array
|
||
|
|
*/
|
||
|
|
public $params = [];
|
||
|
|
}
|