yarco / fast_gster
使用属性文法简单添加getter/setter特性的方法
v1.0.1
2024-02-29 08:23 UTC
Requires
- php: >=8.2
- symfony/expression-language: ^7.0
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2024-08-29 09:31:15 UTC
README
安装
composer require yarco/fast-gster
用法
<?php use \Yarco\FastGster\{Base, Get, Set}; class Example03 { use Base; // comparing to define "getName, setName" by hand #[Get, Set] private string $name; // can also add a guard, will throw an exception if the guard is not met #[Get, Set('age > 0 and age < 120')] private int $age; }
更多内容请查看tests/
。