定制 trueme/mapping-array 二次开发

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

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

trueme/mapping-array

Composer 安装命令:

composer require trueme/mapping-array

包简介

README 文档

README

Package will help you buil a array with $key base on variable name
*Example* : 
    1.1 You want to build array with key=>value to pass to a function
        + caculateFee(['fee' => $fee, 'tax' => $tax, 
                        ['revenueProduct' => $revenueProduct, 'revenueSale' => $revenueSale]
                    ]);
    1.2 With MapArr(), you don't need to build array above
    1.3 Using MapArr
        + $mapArr = new MapArr;
        + caculateFee($mapArr->build([$fee, $tax, [$revenueProduct, $revenueSale]])->get());
        + you will get result as step1.1

| 2. Directory Struct

Root
|__src
|   |__Traits       -> support for String.php
|   |__MapArr.php   -> Main core to build array you need
|   |__Str.php      -> Handle String
|
|
|__index.php -> example call MapArr()->build()->get()
|
|__composer.json - define namespace

| 3. Step by step do it

3.1 Clone/download MappingArray folder to your computer

3.2 Goto MappingArray folder > D:\YourFolder\MappingArray

3.3 Run composer: composer dumpautoload

3.4 Run file D:\YourFolder\MappingArray\index.php for test

| 4. Guide implement MappingArray

4.1 Import TrueMe\MapArr class 
    example you have file D:\YourFolder\index2.php
        use TrueMe\MapArr;

4.2 New TrueMe\MapArr and use it
        D:\YourFolder\index2.php
            + $mapArr = new MapArr;
            + caculateFee($mapArr->build([$fee, $tax, [$revenueProduct, $revenueSale]])->get());

Search Google:

> Lazada TrueMe
> Youtube TrueMe
> Tiktok TrueMe 

Tags:

#TrueMe     #TrueMeNews     #TrueMilk
#TiktokTrueme   #LazadaTrueme

Sites:

https://www.youtube.com/@TrueMeNews

https://www.tiktok.com/@truemenews

https://www.lazada.vn/shop/suatruemilk

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-01-05