PHPackages                             akef/the-magic-dto - 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. akef/the-magic-dto

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

akef/the-magic-dto
==================

The Magic DTO

41PHP

Since Jun 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mohamed-akef/The-Magic-DTO)[ Packagist](https://packagist.org/packages/akef/the-magic-dto)[ RSS](/packages/akef-the-magic-dto/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

The Magic DTO
=============

[](#the-magic-dto)

This library provides functionality to access the class property with setter and getter functions call without implementing them.

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

[](#installation)

Use the package manager [composer](https://getcomposer.org/doc/00-intro.md) to install The-Magic-DTO.

```
composer require akef/the-magic-dto:dev-master
```

Usage
-----

[](#usage)

just you need to use this trait in your class:

```
use \Akef\MDTO\SetAndGetProvider;
```

or call The magic class in your class `__call` magic function like:

```
public function __call($name, $arguments)
{
    return (new \Akef\MDTO\MagicManager())->init($this, $name, $arguments)->run();
}
```

Example
-------

[](#example)

```
require 'vendor/autoload.php';

class Test
{
    use \Akef\MDTO\SetAndGetProvider;

    private $foo;
}

$testObject = new Test();

$test->setFoo('It is working!');
$fooValue = $testObject->getFoo();
echo $fooValue; //It is working!
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1524321?v=4)[Mohamed Akef](/maintainers/mohamed-akef)[@mohamed-akef](https://github.com/mohamed-akef)

---

Top Contributors

[![mohamed-akef](https://avatars.githubusercontent.com/u/1524321?v=4)](https://github.com/mohamed-akef "mohamed-akef (9 commits)")

---

Tags

getterphpsetter

### Embed Badge

![Health badge](/badges/akef-the-magic-dto/health.svg)

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

PHPackages © 2026

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