emeraldinspirations/lib-helper-array 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

emeraldinspirations/lib-helper-array

Composer 安装命令:

composer require emeraldinspirations/lib-helper-array

包简介

README 文档

README

Logo of the project

lib-helper-array

A helper in emeraldinspiration's library.

The goal of this project is to hold commonly used functions that assist in manipulating base PHP datatypes.

Installing / Getting started

This project has no dependencies, so can simply be required with composer

composer require emeraldinspirations/lib-helper-array

Features

  • mapElementFunction - Do an array_map using a function inside the array elements
  • xor - Return an array containing elements only in one of the supplied arrays

Example - mapElementFunction

<?php

use emeraldinspirations\library\helper\phpArray\PhpArray;

class DummyObject
{
    public function test(...$Append)
    {
        return $Char . implode('', $Append);
    }
    public function __construct($Char)
    {
        $this->Char = $Char;
    }
}

$Array = [
    new DummyObject('A'),
    new DummyObject('B'),
    new DummyObject('C'),
];

return PhpArray::mapElementFunction('Test', $Array, 1, 2, 3);

// Returns: ['A123', 'B123', 'C123']

Example - xor

<?php

use emeraldinspirations\library\helper\phpArray\PhpArray;

$Array1         = ['Foo', 'FooBar',        'Bar'       ];
$Array2         = [                 'foo', 'Bar', 'bar'];

return PhpArray::xor($Array1, $Array2),

// Returns:       ['Foo', 'FooBar', 'foo',        'bar'];

Contributing

I hope to expand this class to include other functions. If you'd like to contribute, please fork the repository and use a feature branch. I am new to gitHub and am eager to receive a Pull request to learn how it is done.

I am also open to feedback about how well I am being compliant with standards and "best practices." I have written software solo for years, and am trying to learn how to work better with others.

Licensing

The code in this project is licensed under MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固