定制 switchcat/range-regex 二次开发

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

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

switchcat/range-regex

Composer 安装命令:

composer require switchcat/range-regex

包简介

Returns a regex-compatible range from two numbers, min and max.

README 文档

README

Twitter Follow Issues GitHub All Releases License: MIT Codacy Badge


SwitchCat/range-regex

Table of Contents

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

Use composer from the root of your project folder to download the library.

composer require switchcat/range-regex

Usage

All method return an array containing either the element's data either an array of elements with their data.

  • Create the periodic object
use SwitchCat\RangeRegex\FactoryDefault;
use SwitchCat\RangeRegex\Range;

$Factory = new FactoryDefault();
$converter = $Factory->getConverter();
$Range = new Range(int $min, int $max);

$regex = sprintf('/^(%s)$/', $converter->toRegex($Range));
// /^([1-9]|[1-9][0-9]|[1-9][0-9]{2}|[1-2][0-9]{3}|3[0-3][0-9]{2}|34[0-4][0-9]|345[0-6])$/

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Acknowledgements

No major change has been brought to the original package. Basically ported it to php7.4 (fixed compatibility issues) and added a test suite. Some code optimization has been done in order to comply with code inspection standards. The package was marked "abandoned" and i found it very usefull. I simply decided to give it a second life.

Based on the work of:

Credits

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固