PHPackages                             saeedncc/object-mapper - 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. saeedncc/object-mapper

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

saeedncc/object-mapper
======================

object mapper for php from ymal file

v1.0.1(3y ago)08PHP

Since Jan 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/saeedncc/object-mapper)[ Packagist](https://packagist.org/packages/saeedncc/object-mapper)[ RSS](/packages/saeedncc-object-mapper/feed)WikiDiscussions main Synced 1mo ago

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

php object mapper
=================

[](#php-object-mapper)

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

[](#installation)

Require this package with composer using the following command:

```
composer require saeedncc/object-mapper
```

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

[](#how-to-use)

Define ymal file for custom object like this:

userinfo.yml

```
property:
 - name: 'id'
   map: 'identify'
   type: 'integer'

 - name: 'frist_name'
   map: 'name'
   type: 'string'

 - name: 'last_name'
   map: 'lastname'
   type: 'string'

 - name: 'age'
   map: 'old'
   type: 'integer'

 - name: 'address'
   map: 'address'
   type: 'string'

 - name: 'info'
   map: 'information'
   type: 'object'
   property:
    - name: 'mobile'
      map: 'mobilenumber'
      type: 'string'

    - name: 'tel'
      map: 'telphon'
      type: 'string'

    - name: 'email'
      map: 'mail'
      type: 'string'

```

Get response json or xml from external api or other and convert to object

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

use \saeedncc\ObjectMapper\ObjectMapper;

$pathYmal='./yaml/userinfo.yml';

$xml =  jordan
    [age] => 20
    [address] => north bahar st
    [info] => stdClass Object
        (
            [mobile] => 085236125
            [tel] => 52634855
            [email] => tom@gmail.com
        )

)

$json='{"identify":"125","name":"tom","lastname":"jordan","old":"20","address":"north bahar st","information":{"mobilenumber":"085236125","telphon":"52634855","mail":"tom@gmail.com"}}';

$object=ObjectMapper::map($pathYmal,$json);

print_r($object);

stdClass Object
(
    [id] => 125
    [frist_name] => tom
    [last_name] => jordan
    [age] => 20
    [address] => north bahar st
    [info] => stdClass Object
        (
            [mobile] => 085236125
            [tel] => 52634855
            [email] => tom@gmail.com
        )

)
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

1205d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c6ff780a6ad00294ceb7bf295d7840a90c2625d8090ca75f20f1f741498fcd7?d=identicon)[saeedncc](/maintainers/saeedncc)

---

Top Contributors

[![saeedakbar](https://avatars.githubusercontent.com/u/2732064?v=4)](https://github.com/saeedakbar "saeedakbar (5 commits)")

---

Tags

object-mapperobject-orientedphp

### Embed Badge

![Health badge](/badges/saeedncc-object-mapper/health.svg)

```
[![Health](https://phpackages.com/badges/saeedncc-object-mapper/health.svg)](https://phpackages.com/packages/saeedncc-object-mapper)
```

###  Alternatives

[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[thanks-to-it/wp-dich

121.1k](/packages/thanks-to-it-wp-dich)

PHPackages © 2026

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