Files
kiri-core/Annotation/Route/Document.php
T

48 lines
727 B
PHP
Raw Normal View History

2020-12-18 11:35:35 +08:00
<?php
namespace Annotation\Route;
2021-03-03 18:35:04 +08:00
use Annotation\Attribute;
2021-02-22 17:44:24 +08:00
2020-12-18 11:35:35 +08:00
/**
* Class Document
* @package Annotation\Route
*/
2021-03-03 18:35:04 +08:00
#[\Attribute(\Attribute::TARGET_METHOD)] class Document extends Attribute
2020-12-18 11:35:35 +08:00
{
2020-12-18 11:55:16 +08:00
const INTEGER = 'int';
const STRING = 'string';
const BOOLEAN = 'bool';
const FLOAT = 'float';
const ALIAS = [
self::INTEGER => '整数',
self::STRING => '字符串',
self::BOOLEAN => '布尔值',
self::FLOAT => '浮点',
];
2020-12-18 11:35:35 +08:00
public function __construct(
2020-12-18 16:46:10 +08:00
public array $request,
2020-12-18 16:45:12 +08:00
public array $response
2020-12-18 11:35:35 +08:00
)
{
}
2021-02-22 17:44:24 +08:00
/**
* @param array $handler
* @return array
*/
public function execute(array $handler): array
{
// TODO: Implement execute() method.
return [$this->request, $this->response];
}
2020-12-18 11:35:35 +08:00
}