Skip to content

Releases: nirvana72/phpRest

功能加强

25 Dec 18:04

Choose a tag to compare

1,hook如果处于控制器同层命名空间,支持省略命名空间
2,跳过以Base开头的文件扫描

orm 操作返回null 验证

21 Oct 08:34

Choose a tag to compare

1.0.18

orm 操作返回null 验证

medoo 1.7 > 2.1.3

19 Oct 02:31

Choose a tag to compare

medoo 1.7 > 2.1.3

bugfix

27 Jul 10:01

Choose a tag to compare

public function getEvent($eventName) : array
{
// return $this->events[$eventName];
return $this->events[$eventName] ?: [];
}

Event 增加一个事件名参数

23 Jul 03:53

Choose a tag to compare

Event 增加一个事件名参数

代码调整,增强规范

25 May 09:07

Choose a tag to compare

代码调整,增强规范

事件驱动功能模块

11 May 06:30

Choose a tag to compare

增加事件驱动功能模块

增加一个实用函数 AssocArraySearch

22 Feb 02:37

Choose a tag to compare

$item1 = ['a' => 11, 'b' => 12, 'c' => 13];
$item2 = ['a' => 21, 'b' => 22, 'c' => 23];
$item3 = ['a' => 31, 'b' => 32, 'c' => 33];
$item4 = ['a' => 31, 'b' => 42, 'c' => 43];
$item5 = ['a' => 51, 'b' => 52, 'c' => 53];
$item6 = ['a' => 61, 'b' => 62, 'c' => 63];
$list = [$item2,$item3,$item4,$item5,$item6];

$row = \PhpRest\AssocArraySearch($list, ['a' => 31]);
return $row;

@rule 验证规则支持模板

02 Feb 08:39

Choose a tag to compare

config.php

...
    'App.paramRules' => [
        'phone' => 'regex=/^1[3456789]\d{9}$/',
        'code ' => 'integer|min=1|max=6'
    ],
...

controller.php

...
* @param $p1 {@rule template=code}
...

swagger security 配置

02 Feb 01:51

Choose a tag to compare

 'swagger' => [
   ...
   'security' => true,
   ...
 ],
@swagger !security
@swagger hide