PHPackages                             scheb/property-access - 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. scheb/property-access

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

scheb/property-access
=====================

A lightweight library to read/write values from/to objects to arrays

v1.0.1(7y ago)21451MITPHPPHP ^7.1.3

Since Sep 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/scheb/property-access)[ Packagist](https://packagist.org/packages/scheb/property-access)[ Docs](https://github.com/scheb/property-access)[ RSS](/packages/scheb-property-access/feed)WikiDiscussions master Synced yesterday

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

scheb/property-access
=====================

[](#schebproperty-access)

[![Build Status](https://camo.githubusercontent.com/d80c489504b673393d9086011b908183fab0dd7a1fb066606bf69321bc722066/68747470733a2f2f7472617669732d63692e6f72672f73636865622f70726f70657274792d6163636573732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/scheb/property-access)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d866d70bef07fe6fdc0c6e88d863f6415c26cc1297e08e24c5053849244c3891/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73636865622f70726f70657274792d6163636573732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/scheb/property-access/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/5bf7298d89112e6118c0d6046383cf2a0d53dce839afe76255be5a954aad1de3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73636865622f70726f70657274792d6163636573732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/scheb/property-access/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/28482dc3404432d630ab0600455167cf207ea17a1c9f404eb29a222ccbaa9e99/68747470733a2f2f706f7365722e707567782e6f72672f73636865622f70726f70657274792d6163636573732f762f737461626c652e737667)](https://packagist.org/packages/scheb/property-access)[![License](https://camo.githubusercontent.com/9448c30c390450c78fa72089c868eb853e3927baf93f5465385d98c27f117100/68747470733a2f2f706f7365722e707567782e6f72672f73636865622f70726f70657274792d6163636573732f6c6963656e73652e737667)](https://packagist.org/packages/scheb/property-access)

A library to read/write values from/to objects and arrays.

It is similar to [symfony/property-access](https://github.com/symfony/property-access), but is built in a more lightweight way and therefore has less sophisticated syntax.

Features
--------

[](#features)

- Read properties from objects/arrays
- Write properties from objects/arrays
- Built-in support for camel-case getters and setters
- Can be extended with your own access strategies

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

[](#installation)

```
composer require scheb/property-access
```

How to use
----------

[](#how-to-use)

```
$valueObject = ...; // Array or object

$strategies = [
    new \Scheb\PropertyAccess\Strategy\ArrayAccessStrategy(),
    new \Scheb\PropertyAccess\Strategy\ObjectPropertyAccessStrategy(),
    new \Scheb\PropertyAccess\Strategy\ObjectGetterSetterAccessStrategy(),
];

$accessor = new \Scheb\PropertyAccess\PropertyAccess($strategies);

// Returns the value or null
$accessor->getPropertyValue($valueObject, 'propertyName');

// Returns the modified value object or throws FailedSettingPropertyException
$accessor->setPropertyValue($valueObject, 'propertyName', 'newValue');
```

How to extend
-------------

[](#how-to-extend)

To create your own access strategies, implement `Scheb\PropertyAccess\Strategy\PropertyAccessStrategyInterface` and pass in an instance of that class to the constructor argument `$propertyAccessStrategies` of `Scheb\PropertyAccess\PropertyAccess`.

Contribute
----------

[](#contribute)

You're welcome to [contribute](https://github.com/scheb/property-access/graphs/contributors) to this library by creating a pull requests or feature request in the issues section. For pull requests, please follow these guidelines:

- Symfony code style
- PHP7.1 type hints for everything (including: return types, `void`, nullable types)
- Please add/update test cases
- Test methods should be named `[method]_[scenario]_[expected result]`

To run the test suite install the dependencies with `composer install` and then execute `bin/phpunit`.

License
-------

[](#license)

This bundle is available under the [MIT license](LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~4 days

Total

2

Last Release

2805d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/496658d46619a414a62b1e933fb7fc2e57eff4f0a4109f4cffc32093f57d65da?d=identicon)[scheb](/maintainers/scheb)

---

Top Contributors

[![scheb](https://avatars.githubusercontent.com/u/1259952?v=4)](https://github.com/scheb "scheb (6 commits)")

---

Tags

accessarrayobjectpropertyproperty-accessorsread-writearrayobjectaccesspropertyread-write

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/scheb-property-access/health.svg)

```
[![Health](https://phpackages.com/badges/scheb-property-access/health.svg)](https://phpackages.com/packages/scheb-property-access)
```

###  Alternatives

[symfony/property-access

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

2.8k295.3M2.5k](/packages/symfony-property-access)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[jasny/dotkey

Dot notation access for objects and arrays

14219.5k6](/packages/jasny-dotkey)[michaldudek/foundation

A set of useful PHP classes.

13111.9k13](/packages/michaldudek-foundation)[peridot-php/object-path

A string syntax to fetch values from array and object hierarchies

1053.6k1](/packages/peridot-php-object-path)[michaels/data-manager

Simple data manager for nested data, dot notation array access, extendability, and container interoperability.

121.9k2](/packages/michaels-data-manager)

PHPackages © 2026

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