PHPackages                             axy/magic - 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. axy/magic

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

axy/magic
=========

Work with magic fields

1.0.3(10y ago)04073MITPHPPHP &gt;=5.4.0

Since Dec 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/axypro/magic)[ Packagist](https://packagist.org/packages/axy/magic)[ Docs](https://github.com/axypro/magic)[ RSS](/packages/axy-magic/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (12)Used By (3)

axy\\magic
==========

[](#axymagic)

Access to magic fields (PHP).

[![Latest Stable Version](https://camo.githubusercontent.com/a8e4a6e9ac5e2168e3ed65b8df7a693c54ba34699b3901276285853bac93a505/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6178792f6d616769632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/axy/magic)[![Minimum PHP Version](https://camo.githubusercontent.com/b52c83f3d45755ebcb1e6863ebb202ab192aaf773424369ffdeedae107f027ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e342d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Build Status](https://camo.githubusercontent.com/f5a367c01692b16f041645795a8d6f3805d39be96fa0306d2217efcb46315f64/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f61787970726f2f6d616769632f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/axypro/magic)[![Coverage Status](https://camo.githubusercontent.com/11399ae29d30224f3cb149c2fd44a4e062062662fea31f7e4bb0aa7a9379225b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f61787970726f2f6d616769632f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/axypro/magic?branch=master)[![License](https://camo.githubusercontent.com/1ccc0672c81fec5fdeafe743b9f1e843006991d96c465cbe5c96cfbb638bca9a/68747470733a2f2f706f7365722e707567782e6f72672f6178792f6d616769632f6c6963656e7365)](LICENSE)

- The library does not require any dependencies (except composer packages).
- Tested on PHP 5.4+, PHP 7, HHVM (on Linux), PHP 5.5 (on Windows).
- Install: `composer require axy/magic`.
- License: [MIT](LICENSE).

### Documentation

[](#documentation)

The library provides several features for creating and accessing magic properties.

Most of the features made in the form of [Traits](http://php.net/traits). So it can be implemented in classes at any level. And they can be combined with each other.

- [ReadOnly](doc/ReadOnly.md) - the read-only container
- [ArrayMagic](doc/ArrayMagic.md) - access to fields as array elements
- [Named](doc/Named.md) - named objects
- [LazyField](doc/LazyField.md) - lazy fields
- [LazyContainer](doc/LazyContainer.md) - container with fixed set of lazy properties
- [ArrayWrapper](doc/ArrayWrapper.md) - wrapper over an array
- [List of errors](doc/errors.md)

The properties and methods defined by these Traits have the prefix `magic`.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Recently: every ~163 days

Total

11

Last Release

3839d ago

Major Versions

0.1.4 → 1.0.02015-01-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/e5b3a2db8d5614167d4510019e3373dbba63c6aade58d38d23f3e7d2e63c3c4a?d=identicon)[axy](/maintainers/axy)

---

Top Contributors

[![vasa-c](https://avatars.githubusercontent.com/u/557081?v=4)](https://github.com/vasa-c "vasa-c (55 commits)")

---

Tags

Read onlyArrayAccessmagic

### Embed Badge

![Health badge](/badges/axy-magic/health.svg)

```
[![Health](https://phpackages.com/badges/axy-magic/health.svg)](https://phpackages.com/packages/axy-magic)
```

###  Alternatives

[adbario/php-dot-notation

PHP dot notation access to arrays

4638.8M182](/packages/adbario-php-dot-notation)[rappasoft/lockout

Put your Laravel application into read-only mode.

96280.4k2](/packages/rappasoft-lockout)[lochmueller/autoloader

Automatic components loading of ExtBase extensions to get more time for coffee in the company ;) This ext is not a PHP SPL autoloader or class loader - it is better! Loads CommandController, Xclass, Hooks, FlexForms, Slots, TypoScript, TypeConverter, BackendLayouts and take care of createing needed templates, TCA configuration or translations at the right location.

19364.9k5](/packages/lochmueller-autoloader)[rotexsoft/versatile-collections

A collection package that can be extended to implement things such as a Dependency Injection Container, RecordSet objects for housing database records, a bag of http cookies, or technically any collection of items that can be looped over and whose items can each be accessed using array-access syntax or object property syntax.

186.0k1](/packages/rotexsoft-versatile-collections)

PHPackages © 2026

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