easyswoole/doctrine-annotations

An efficient swoole framework

1.0.1 2020-08-28 03:10 UTC

This package is auto-updated.

Last update: 2024-03-28 11:09:53 UTC


README

版权声明

本项目修改自 doctrine/annotation , 原项目开源协议为MIT协议。为满足无法实现plainText解析 与json array,故此实现专版。

使用

其他使用方法与原库一致

plaintText

用法为:

 MyAnnotation(myProperty=r"{"code":200}")

也就是格式为

r"{RAW}"

字母r+双引号。

json Array

用法为:

@PropertyTag(input={"code":2,"result":[{"name":1}]})

可以直接解析为完整的数组。

单元测试

关于单元测试已经迁移了原库的单元测试,并增补了plainText与json array的解析