2020-04-28 16:34:17 +08:00
|
|
|
<?php
|
2020-04-28 22:02:03 +08:00
|
|
|
namespace catcher\generate\template;
|
2020-04-28 16:34:17 +08:00
|
|
|
|
|
|
|
trait Request
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* 规则
|
|
|
|
*
|
|
|
|
* @time 2020年04月24日
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return <<<EOT
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
{rules}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
EOT;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 消息
|
|
|
|
*
|
|
|
|
* @time 2020年04月24日
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function message()
|
|
|
|
{
|
|
|
|
return <<<EOT
|
|
|
|
public function message(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
{messages}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
}
|