ali-eltaweel/computed-properties
最新稳定版本:1.0.1
Composer 安装命令:
composer require ali-eltaweel/computed-properties
包简介
A PHP library for computed properties.
README 文档
README
Installation
Install computed-properties via Composer:
composer require ali-eltaweel/computed-properties
Usage
Declaring Computed Properties
use Lang\{ Annotations\Computes, ComputedProperties }; class User { use ComputedProperties; #[Computes('fullName')] public function getFullName(): string { return $this->firstName . ' ' . $this->lastName; } }
Dynamic Properties
use Lang\{ Annotations\Computes, ComputedProperties }; class Config { use ComputedProperties; private array $config; #[Computes(provider: 'getConfigKeys')] public function getConfigValue(string $key) { return $this->config[$key]; } function getConfigKeys(): array { return array_keys($this->config); } }
统计信息
- 总下载量: 143
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2025-06-15