2017 © Pedro Peláez
 

library finder-by-config

Create Symfony\Component\Finder instances by configuration

image

schnittstabil/finder-by-config

Create Symfony\Component\Finder instances by configuration

  • Sunday, March 18, 2018
  • by schnittstabil
  • Repository
  • 1 Watchers
  • 1 Stars
  • 791 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

FinderByConfig Build Status Coverage Status Scrutinizer Code Quality Code Climate

SensioLabsInsight, (*1)

Create Symfony\Component\Finder instances by configuration, (*2)

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., (*3)

Option Type Description
directories bool directories only
files bool files only
depth `string string[]| directory depth, e.g.'> 1'`
date `string string[]| last modified [strtotime](http://php.net/manual/en/function.strtotime.php) parsable date, files must match e.g.'>= 2005-10-15'`
name `string string[]` | regexp patterns, globs or simple strings files must match
notName `string string[]` | regexp patterns, globs or simple strings files must not match
contains `string string[]` | pattern (string or regexp) file contents must match
notContains `string string[]` | pattern (string or regexp) file contents must not match
path `string string[]` | regexp patterns, globs or simple strings files must match
notPath `string string[]` | regexp patterns, globs or simple strings files must not match
size `string string[]| size files must match, e.g.'<= 1Ki'`
exclude `string string[]` | directories to exclude
ignoreDotFiles bool exclude directories and files starting with a dot
ignoreVCS bool exclude version control directories
addVCSPattern `string string[]` | additional version control patterns
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[]` | directory and file paths

License

MIT © Michael Mayer, (*4)

The Versions

18/03 2018

dev-master

9999999-dev

Create Symfony\Component\Finder instances by configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

config finder

18/03 2018

1.1.0

1.1.0.0

Create Symfony\Component\Finder instances by configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

config finder

14/02 2017

1.0.0

1.0.0.0

Create Symfony\Component\Finder instances by configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

config finder

15/04 2016

0.1.1

0.1.1.0

Create Symfony\Component\Finder instances by configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

config finder

15/04 2016

0.1.0

0.1.0.0

Create Symfony\Component\Finder instances by configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

config finder