PHPackages                             aipng/apitte-mapping - 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. aipng/apitte-mapping

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

aipng/apitte-mapping
====================

Custom type mappers for contributte/apitte

v1.0.1(3w ago)02↓100%MITPHPPHP &gt;=8.4CI passing

Since May 16Pushed 3w agoCompare

[ Source](https://github.com/aipng/apitte-mapping)[ Packagist](https://packagist.org/packages/aipng/apitte-mapping)[ RSS](/packages/aipng-apitte-mapping/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

aipng/apitte-mapping
====================

[](#aipngapitte-mapping)

Custom parameter type mappers for [contributte/apitte](https://github.com/contributte/apitte).

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

[](#installation)

```
composer require aipng/apitte-mapping
```

Registration
------------

[](#registration)

Register the mappers manually in your Nette configuration:

```
api:
    plugins:
        Apitte\Core\DI\Plugin\CoreMappingPlugin:
            types:
                date: AipNg\ApitteMapping\Parameter\DateTypeMapper
                email: AipNg\ApitteMapping\Parameter\EmailTypeMapper
                int_array: AipNg\ApitteMapping\Parameter\IntegerArrayTypeMapper
```

Mappers
-------

[](#mappers)

### DateTypeMapper

[](#datetypemapper)

Type name: `date`

Accepts a date string in `Y-m-d` format and returns a `DateTimeImmutable` with time set to `00:00:00`.

Invalid input throws `Apitte\Core\Exception\Runtime\InvalidArgumentTypeException`.

### EmailTypeMapper

[](#emailtypemapper)

Type name: `email`

Accepts an email address string and returns an `AipNg\ValueObjects\Web\Email` value object. The address is normalized to lowercase.

Invalid input throws `Apitte\Core\Exception\Runtime\InvalidArgumentTypeException`.

### IntegerArrayTypeMapper

[](#integerarraytypemapper)

Type name: `int_array`

Accepts a comma-separated string of integers (e.g. `1,2,3`) and returns `array`. Whitespace around items is trimmed. Empty string or comma-only input returns an empty array.

Invalid input (non-string, non-integer values, floats) throws `Apitte\Core\Exception\Runtime\InvalidArgumentTypeException`.

Usage
-----

[](#usage)

```
use Apitte\Core\Annotation\Controller\Path;
use Apitte\Core\Annotation\Controller\RequestParameter;
use Apitte\Core\Annotation\Controller\Method;
use Apitte\Core\Http\ApiRequest;
use Apitte\Core\Http\ApiResponse;
use AipNg\ValueObjects\Web\Email;

#[Path('/users')]
final class UserController implements \Apitte\Core\UI\Controller\IController
{

    #[Path('/search')]
    #[Method('GET')]
    public function search(
        ApiRequest $request,
        ApiResponse $response,
        #[RequestParameter(name: 'email', type: 'email')] Email $email,
        #[RequestParameter(name: 'since', type: 'date')] \DateTimeImmutable $since,
        #[RequestParameter(name: 'ids', type: 'int_array', required: false)] array $ids = [],
    ): ApiResponse
    {
        // $email is AipNg\ValueObjects\Web\Email
        // $since is DateTimeImmutable at 00:00:00
        // $ids is array
        ...
    }

}
```

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

4

Last Release

24d ago

Major Versions

v0.2 → v1.0.02026-05-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29610479?v=4)[aipng](/maintainers/aipng)[@aipng](https://github.com/aipng)

---

Top Contributors

[![khorsky](https://avatars.githubusercontent.com/u/160295?v=4)](https://github.com/khorsky "khorsky (12 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aipng-apitte-mapping/health.svg)

```
[![Health](https://phpackages.com/badges/aipng-apitte-mapping/health.svg)](https://phpackages.com/packages/aipng-apitte-mapping)
```

###  Alternatives

[jahvi/magento2-copy-theme-override

Magento 2 command to automatically copy files into active theme

124.5k](/packages/jahvi-magento2-copy-theme-override)

PHPackages © 2026

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