定制 antonioprimera/php-helpers 二次开发

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

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

antonioprimera/php-helpers

最新稳定版本:v1.1

Composer 安装命令:

composer require antonioprimera/php-helpers

包简介

A lightweight set of php helpers, providing some missing or hard to achieve functionality, without the need to import some larger packages

README 文档

README

Latest Version on Packagist Tests Total Downloads

This is a lightweight set of php helpers, providing some missing or hard to achieve functionality in PHP, without the need to import some larger packages. This package is intended to be used in PHP Packages and projects, which are not using a framework like Laravel or Symfony (which already provide these functionalities).

Helpers

Array Helpers

  • arrayMap($array, $callback) - Maps an array using a callback function, preserving the keys
  • arrayMapWithKeys($array, $callback) - Maps an array using a callback function, allowing you to also change the keys

String Helpers

  • kebabCase($string) - Converts a string to kebab-case
  • classBasename($classOrObject) - Returns the class name without the namespace

Installation

You can install the package via composer:

composer require antonioprimera/php-helpers

Contributing

Please be free to contribute to this package by submitting a pull request with any useful helper functions you might have. Please make sure to add tests for any new functionality.

This package will only contain basic helper functions, which are not already provided by PHP itself or which are hard to achieve in just one line with the built-in functions.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-21