codesinging/support

PHP网站开发的优秀支持助手。

2.0.0 2020-05-06 11:56 UTC

This package is auto-updated.

Last update: 2024-09-07 23:59:28 UTC


README

PHP网站开发的优秀支持助手。

感谢

安装

$ composer require codesinging/support -vvv

用法

助手

  1. load_config($file)

Arr

  1. accessible($value)
  2. add($array, $key, $value)
  3. divide($array)
  4. dot($array, $prepend = '')
  5. except($array, $keys)
  6. exists($array, $key)
  7. first($array, callable $callback = null, $default = null)
  8. last($array, callable $callback = null, $default = null)
  9. flatten($array, $depth = INF)
  10. forget(&$array, $keys)
  11. get($array, $key, $default = null)
  12. has($array, $keys)
  13. isAssoc(array $array)
  14. only($array, $keys)
  15. prepend($array, $value, $key = null)
  16. pull(&$array, $key, $default = null)
  17. query($array)
  18. random($array, $number = null)
  19. set(&$array, $key, $value)
  20. shuffle($array, $seed = null)
  21. where($array, callable $callback)
  22. wrap($value)

Str

  1. after($subject, $search)
  2. afterLast($subject, $search)
  3. before($subject, $search)
  4. beforeLast($subject, $search)
  5. camel($value)
  6. contains($haystack, $needles)
  7. containsAll($haystack, array $needles)
  8. endsWith($haystack, $needles)
  9. finish($value, $cap)
  10. kebab($value)
  11. length($value, $encoding = null)
  12. limit($value, $limit = 100, $end = '...')
  13. lower($value)
  14. random($length = 16)
  15. replaceArray($search, array $replace, $subject)
  16. replaceFirst($search, $replace, $subject)
  17. replaceLast($search, $replace, $subject)
  18. snake($value, $delimiter = '_')
  19. start($value, $prefix)
  20. startsWith($haystack, $needles)
  21. studly($value)
  22. substr($string, $start, $length = null)
  23. title($value)
  24. ucfirst($string)
  25. upper($value)
  26. words($value, $words = 100, $end = '...')

仓库

  1. has(string $key)
  2. get($key, $default = null)
  3. getMany(array $keys)
  4. set($key, $value = null)
  5. prepend(string $key, $value)
  6. push(string $key, $value)
  7. all()

贡献

您可以通过以下三种方式之一进行贡献

  1. 使用问题跟踪器提交错误报告。
  2. 问题跟踪器上回答问题或修复错误。
  3. 贡献新功能或更新wiki。

代码贡献流程不是很正式。您只需确保遵循PSR-0、PSR-1和PSR-2编码指南。任何新的代码贡献都必须附带适用的单元测试。

许可证

MIT