PHPackages                             ali-eltaweel/virtual-props - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ali-eltaweel/virtual-props

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ali-eltaweel/virtual-props
==========================

Virtual properties setters

1.0.0(1y ago)0761PHPPHP ^8.1

Since Jun 20Pushed 1y agoCompare

[ Source](https://github.com/ali-eltaweel/virtual-props)[ Packagist](https://packagist.org/packages/ali-eltaweel/virtual-props)[ RSS](/packages/ali-eltaweel-virtual-props/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Virtual Properties
==================

[](#virtual-properties)

- [Virtual Properties](#virtual-properties)
    - [Installation](#installation)
    - [Usage](#usage)
        - [Declaring Virtual Properties](#declaring-virtual-properties)

---

Installation
------------

[](#installation)

Install *virtual-props* via Composer:

```
composer require ali-eltaweel/virtual-props
```

Usage
-----

[](#usage)

### Declaring Virtual Properties

[](#declaring-virtual-properties)

```
use Lang\{ Annotations\Sets, VirtualProperties };

class X {

  use VirtualProperties;

  private array $data = [];

  #[Sets('x')] private function setX(int $value) {

    $this->data['x'] = $value;
  }

  #[Sets('y')] private function setY(int $value) {

    $this->data['y'] = $value;
  }

  #[Sets('i', 'j')] private function setProp(int $value, string $name) {

    $this->data[$name] = $value;
  }
}
```

```
$x = new X();

$x->x = 10;
$x->y = 20;
$x->i = 30;
$x->j = 40;
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance49

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

379d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/45892756?v=4)[Ali Kamel](/maintainers/ali-eltaweel)[@ali-eltaweel](https://github.com/ali-eltaweel)

---

Top Contributors

[![ali-eltaweel](https://avatars.githubusercontent.com/u/45892756?v=4)](https://github.com/ali-eltaweel "ali-eltaweel (2 commits)")

### Embed Badge

![Health badge](/badges/ali-eltaweel-virtual-props/health.svg)

```
[![Health](https://phpackages.com/badges/ali-eltaweel-virtual-props/health.svg)](https://phpackages.com/packages/ali-eltaweel-virtual-props)
```

###  Alternatives

[ergebnis/agent-detector

Provides a detector for detecting the presence of an agent.

144.2M5](/packages/ergebnis-agent-detector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
