Files
kiri-core/Annotation/RequestValidator.php
T

38 lines
498 B
PHP
Raw Normal View History

2020-12-15 12:24:38 +08:00
<?php
namespace Annotation;
2020-12-16 15:20:51 +08:00
use Exception;
use validator\Validator;
2020-12-15 12:24:38 +08:00
/**
* Class RequestValidator
* @package Annotation
*/
2021-03-03 18:35:04 +08:00
#[\Attribute(\Attribute::TARGET_METHOD)] class RequestValidator extends Attribute
2020-12-15 12:24:38 +08:00
{
/**
* RequestValidator constructor.
* @param array $validators
2020-12-16 15:20:51 +08:00
* @throws Exception
2020-12-15 12:24:38 +08:00
*/
public function __construct(public array $validators)
{
}
2021-02-22 17:44:24 +08:00
/**
* @param array $handler
* @return bool
*/
public function execute(array $handler): bool
{
return true;
}
2020-12-15 12:24:38 +08:00
}