elephox / support
Elephox 支持库。
v0.7.0
2022-07-02 22:54 UTC
Requires
- php: ^8.1 <8.3
- elephox/mimey: ^4.0
- elephox/oor: dev-develop
Suggests
- ext-fileinfo: To get the mime type of a file
- dev-develop
- 0.9.0.x-dev
- 0.8.0.x-dev
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.3
- v0.4.0
- 0.4.0-alpha5
- 0.4.0-alpha4
- 0.4.0-alpha3
- 0.4.0-alpha2
- 0.4.0-alpha1
- 0.3.27
- v0.3.25
- v0.3.24
- v0.3.23
- v0.3.22
- v0.3.21
- v0.3.20
- v0.3.18
- v0.3.17
- v0.3.16
- v0.3.15
- v0.3.14
- v0.3.13
- v0.3.12
- v0.3.11
- v0.3.10
- v0.3.9
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.1
- dev-release/0.9
- dev-release/0.8
- dev-release/0.6.0
- dev-16-psr-20-clock
- dev-18-make-servicecollection-more-extensible
- dev-release/0.6
- dev-release/0.7
- dev-goal/use_getoptphp_for_commands
- dev-release/0.5
- dev-release/0.4
- dev-release/0.3
This package is auto-updated.
Last update: 2024-08-30 01:07:17 UTC
README
此模块由 Elephox 使用,用于常见的重复使用功能,如 DeepCloneable
或 TransparentGetterSetter
,或用于存放通用的类。
示例
<?php use Elephox\Support\TransparentGetterSetter; use Elephox\Support\DeepCloneable; class MyClass { use TransparentGetterSetter; use DeepCloneable; private int $foo = 1; } $instance = new MyClass(); $instance->setFoo(2); // uses __set implicitly $clone = $instance->deepClone(); $clone->getFoo(); // 2 $clone->setFoo(3); // doesn't affect $instance