定制 sgh/comparable-filesystem 二次开发

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

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

sgh/comparable-filesystem

最新稳定版本:v1.1.1

Composer 安装命令:

composer require sgh/comparable-filesystem

包简介

Provides Comparators for the file system.

README 文档

README

Author Latest Version Software License Build Status

This package provides Comparators for the file system, i.e. for SplFileInfo objects. They can be used with the sorting and comparing tools in the Comparable package.

Requirements

The package requires PHP 5.4 or later and the Comparable package in version 1.0 or later.

Install

Via Composer

$ composer require sgh/comparable-filesystem

Usage

The following comparators are available:

  • FileATimeComparator
  • FileCTimeComparator
  • FileMTimeComparator
  • FileNameComparator
  • FileSizeComparator
  • FileTypeComparator

You can use all the methods in \SGH\Comparable\SortFunctions and \SGH\Comparable\SetFunctions with the comparators. If you prefer, you can also use the factory method ::callback() to retrieve a comparison callback, that can be used in any function that expects a user defined comparison callback:

usort($arrayOfFiles, \SGH\Comparable\Filesystem\Comparator\FileSizeComparator::callback());

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email fschmengler@sgh-it.eu instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-05