PHPackages                             alaa-almaliki/property-setter-config - 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. alaa-almaliki/property-setter-config

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

alaa-almaliki/property-setter-config
====================================

PHP library can be used to set object properties by a given array passed in the constructor

0.1.1(8y ago)037MITPHP

Since Aug 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alaa-almaliki/property-setter-config)[ Packagist](https://packagist.org/packages/alaa-almaliki/property-setter-config)[ Docs](https://github.com/alaa-almaliki/property-setter-config)[ RSS](/packages/alaa-almaliki-property-setter-config/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (4)Used By (0)

Property Setter Config
======================

[](#property-setter-config)

A simple class sets object properties by a given array passed in class constructor

### Installation

[](#installation)

Add the following segment to your `composer.json` file on you project, then run `composer install` or `composer require alaa-almaliki/property-setter-config`

### Example

[](#example)

```
class MyClass
{
    private $firstName;
    private $lastName;
    private $email;
    private $friends = [];

    public function __construct(array $config = [])
    {
        PropertySetterConfig::setObjectProperties($this, $config);
    }

    public function setFirstName($value)
    {
        $this->firstName = $value;
    }

    public function getFirstName()
    {
        return $this->firstName;
    }

    public function setLastName($value)
    {
        $this->lastName = $value;
        return $this;
    }

    public function getLastName()
    {
        return $this->lastName;
    }

    public function setEmail($value)
    {
        $this->email = $value;
        return $this;
    }

    public function getEmail()
    {
        return $this->email;
    }

    public function setFriends(array $value)
    {
        $this->friends = $value;
        return $this;
    }

    public function getFriends()
    {
        return $this->friends;
    }
}

$obj = new MyClass([
    'first_name' => 'alaa',
    'last_name' => 'almaliki',
    'email'     => 'alaa.almaliki@gmail.com',
    'friends' => [
        'Adam',
        'Melissa',
        'laith',
        'Ahmed'
    ]
]);

```

Enjoy :)

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~15 days

Total

2

Last Release

3118d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c696bf597ea0fdd1fd166ce20d7c15c873f16547e874bd67ecb70c4abfdb2cb?d=identicon)[alaa-almaliki](/maintainers/alaa-almaliki)

---

Top Contributors

[![alaa-almaliki](https://avatars.githubusercontent.com/u/7830984?v=4)](https://github.com/alaa-almaliki "alaa-almaliki (21 commits)")

---

Tags

configurationphpphp-librarypropertysetter methodobject property setter

### Embed Badge

![Health badge](/badges/alaa-almaliki-property-setter-config/health.svg)

```
[![Health](https://phpackages.com/badges/alaa-almaliki-property-setter-config/health.svg)](https://phpackages.com/packages/alaa-almaliki-property-setter-config)
```

###  Alternatives

[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k289.0M2.2k](/packages/symfony-property-access)

PHPackages © 2026

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