定制 schnittstabil/finder-by-config 二次开发

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

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

schnittstabil/finder-by-config

Composer 安装命令:

composer require schnittstabil/finder-by-config

包简介

Create Symfony\Component\Finder instances by configuration

README 文档

README

SensioLabsInsight

Create Symfony\Component\Finder instances by configuration

Install

$ composer require schnittstabil/finder-by-config

Usage

{
    ...
    "require": {
        "schnittstabil/finder-by-config": ...
    },
    "extra": {
        "you/your-package": {
            "simple": ["src", "tests", "composer.json"],
            "extended": {
                "in": ["."],
                "name": ["*.php", "*.json"],
                "notName": ["*Test.php"],
                "size": ["> 1K"],
                "exclude": ["build", "vendor"],
                "ignoreDotFiles": true,
                "ignoreVCS": true,
                "followLinks": false,
                "ignoreUnreadableDirs": false
            }
        }
    }
}
$config = json_decode(file_get_contents('composer.json'))->extra->{'you/your-package'};

$finder = \Schnittstabil\FinderByConfig\FinderByConfig::createFinder($config->simple);
$finder = \Schnittstabil\FinderByConfig\FinderByConfig::createFinder($config->extended);

Supported configuration options

For details see the Finder Component Documentation.

Option Type Description
directories bool directories only
files bool files only
depth `string string[]`
date `string string[]`
name `string string[]`
notName `string string[]`
contains `string string[]`
notContains `string string[]`
path `string string[]`
notPath `string string[]`
size `string string[]`
exclude `string string[]`
ignoreDotFiles bool exclude directories and files starting with a dot
ignoreVCS bool exclude version control directories
addVCSPattern `string string[]`
sortByName bool sorts by name
sortByType bool sorts by type
sortByAccessedTime bool sorts by the last accessed time
sortByChangedTime bool sorts by the last inode changed time
sortByModifiedTime bool sorts by the last modified time
followLinks bool follow symlinks
ignoreUnreadableDirs bool ignore unreadable directories
in `string string[]`

License

MIT © Michael Mayer

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固