jleo / popo-hyperf
dev-main
2025-05-22 11:22 UTC
Requires (Dev)
- hyperf/framework: ^3.1
- hyperf/http-server: ^3.1
- hyperf/stringable: ^3.1
- hyperf/validation: ^3.1
This package is auto-updated.
Last update: 2025-05-22 11:22:33 UTC
README
将入参数据绑定到对象中,支持一维数据,也支持多维数据,参考java的pojo而来
此包适用hyperf框架
thinkphp 框架可参考下边的 https://github.com/afubao/popo-thinkphp
使用
需要再config中启用popo中间件 PoPoMiddleware::class
定义相对应的数据,待完善
class TestParam extends \Leo\Popo\Popo { private int $intValue; private string $stringValue; private array $arrayValue; private UserParam $objValue1; #[ObjArray(UserParam::class)] private array $objValue2; }