fev/sorter 问题修复 & 功能扩展

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

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

fev/sorter

Composer 安装命令:

composer create-project fev/sorter

包简介

Simple library for sorting arrays.

README 文档

README

This library provide two methods (ascending, descending) for sorting arrays.

Installation

For install this library just execute the following command

$ composer require fev/sorter

Usage

For usage this library you need:

  1. Create object form basic class Sorter
$sorter = new Sorter();
  1. Define 1 form 2 default sorting methods SortingABC, SortingCBA by method setSortingMethod
$sorter->setSortingMethod(new SortingABC());

or

$sorter->setSortingMethod(new SortingCBA());
2.1 If you not define sorting methods, then class will be work by default mode like null object pattern.
  1. Use sort method for sorting your array.
$sorter->sort($test_arr);

Extension

For extended this library with own sorting rules create new sorting class which implement SorterInterface with method sort()

Tests

You can run tests with next command

$ php test.php.

License

license

This project is released under the terms of the BSD-3-Clause license.

Copyright (c) 2020, FEV

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-08-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固