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
- Install the library using composer:
composer require sicram/automapper
- Register the library in your provider:
use Sicram\Automapper\Automapper; use Sicram\Automapper\IAutomapper; $this->app->bind(IAutomapper::class, Automapper::class);
- 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
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-11