co-stack/lib 问题修复 & 功能扩展

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

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

co-stack/lib

最新稳定版本:v8.3.0

Composer 安装命令:

composer require co-stack/lib

包简介

A set of really useful, well tested and high performant php functions

README 文档

README

(Only active branch badges are listed)

PHP 8.4 pipeline status coverage report \ PHP 8.3 pipeline status coverage report \ PHP 8.2 pipeline status coverage report \ PHP 8.1 pipeline status coverage report

About

co-stack.com lib provides generic everyday functions, which aim to help you to focus on your main task. This package tries to achieve this by providing:

  • intuitive function names
  • high quality code
  • constant performance optimization
  • extensive documentation
  • 100% test coverage
  • dependency free code
  • mostly pure functions
  • namespaced functions
  • Static Methods as OOP alternative

So you don't need to bother about performance or implementation details.

Classes list

This list does not include classes which are aliases/wrappers for functions.

  • \CoStack\Lib\Contract\Invokable: An interface to force classes to implement __invoke like Stringable.
  • \CoStack\Lib\Generic\Uri: (Immutable) Basic URI implementation with methods to create variations.
  • \CoStack\Lib\Pattern\MagicMethodsForImmutables: A trait which implements __call to make all properties get-, with- and without-able.
  • \CoStack\Lib\Pattern\Singleton: The classic singleton pattern. Note that singletons must not have constructor arguments and you are not allowed to override __construct.
  • \CoStack\Lib\Utility\StringPool: Reduces memory usage by interning strings. Refer to pool DocBlock.

Function list

  • array_filter_recursive: Like array_filter, but recursively.
  • array_value: Get an array value by an index path.
  • array_property: array_column for objects
  • array_unique_keys: Get an array of all distinct keys fo all arrays.
  • concat_paths: Concatenate filesystem paths without duplicate directory separators.
  • mkdir_deep: mkdir with the recursive flag, but without mode.
  • factory: Creates a new object by mapping an associative array to constructor arguments and public properties.
  • filter: Factory for simple filter closures for use with array_filter.
  • cgi_parse_str: A pure and actually CGI compliant parse_str alternative.
  • pool: Alias for \CoStack\Lib\Utility\StringPool::get.
  • enumerate: Implode strings for natural (human) language.

Compatibility

There is one branch for each supported PHP version. Each branch has its own major version number. Only PHP versions, which are officially maintained are supported. Lower supported versions receive backports of all features, which are possible in that PHP Version. (e.g. type annotations will be backported, but Attributes will not be available below PHP 8.0)

VersionPHP VersionBranch NameMaintained untilCurrently Supported
1.x7.2php7231 Jul 2021
2.x7.3php736 Dec 2021
3.x7.4php7428 Nov 2022
4.x8.0php8026 Nov 2023
5.x8.1php8131 Dec 2025
6.x8.2php8231 Dec 2026
7.x8.3php8331 Dec 2027
8.x8.4php8431 Dec 2028

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-31