定制 sicram/automapper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sicram/automapper

最新稳定版本:0.0.5

Composer 安装命令:

composer require sicram/automapper

包简介

A simple library to map objects

README 文档

README

Introduction

TODO: A simple library to map objects.

Getting Started

  1. Install the library using composer:

composer require sicram/automapper

  1. Register the library in your provider:
use Sicram\Automapper\Automapper;
use Sicram\Automapper\IAutomapper;

$this->app->bind(IAutomapper::class, Automapper::class);
  1. Example of usage:
use Sicram\Automapper\IAutomapper;	

class ExampleController extends Controller
{
    public function __construct(private IAutomapper $_automapper)
    {
    }

    public function index()
    {
        $source = new Source();
        $source->name = 'John';
        $source->age = 20;

        $destination = $this->_automapper->map($source, Destination::class);

        return $destination;
    }
}

# Build and Test
You can use the following class to build a test with doubles:

```php
use Sicram\Automapper\Tests\Supports\Doubles\Automapper\StubAutomapper;

Contribute

TODO: Explain how other users and developers can contribute to make your code better.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-11