FileFilter
in package
Class FileFilter
Tags
Table of Contents
Properties
- $attempts : mixed
- $default : mixed
- $normalizer : mixed
- $question : mixed
- $validator : mixed
- $wrappedMethodHistory : mixed
Methods
- __call() : $this
- Magic function to wrapper some Symfony Finder method
- __construct() : mixed
- Constructor.
- changed() : $this
- date() : $this
- directories() : $this
- dots() : $this
- filter() : $this
- followSymlinks() : $this
- getDefault() : mixed
- Returns the default answer.
- getMaxAttempts() : null|int
- Gets the maximum number of attempts.
- getNormalizer() : string|Closure
- Gets the normalizer for the response.
- getQuestion() : string
- Returns the question.
- getResultFor() : array<string|int, mixed>
- Get the list of directory and files that match the current partial path (or its parent directory)
- getValidator() : null|callable
- Gets the validator for the question.
- modified() : $this
- owner() : $this
- setMaxAttempts() : $this
- Sets the maximum number of attempts.
- setNormalizer() : $this
- Sets a normalizer for the response.
- setValidator() : $this
- Sets a validator for the question.
- size() : $this
- sort() : $this
- sortByName() : $this
- sortBySize() : $this
- finderWrapperAdd() : mixed
- Keep in memory Finder configuration
- finderWrapperInject() : mixed
- Configure a Symfony Finder
- newFinder() : Finder
- Return a new Symfony Finder configured
Properties
$attempts
private
mixed
$attempts
$default
private
mixed
$default
$normalizer
private
mixed
$normalizer
$question
private
mixed
$question
$validator
private
mixed
$validator
$wrappedMethodHistory
private
mixed
$wrappedMethodHistory
= array()
Methods
__call()
Magic function to wrapper some Symfony Finder method
public
__call(string $name, array<string|int, mixed> $arguments) : $this
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Tags
Return values
$this__construct()
Constructor.
public
__construct(string $question[, mixed $default = null ]) : mixed
Parameters
- $question : string
-
The question to ask to the user
- $default : mixed = null
-
The default answer to return if the user enters nothing
changed()
public
changed([string $date = ]) : $this
Parameters
- $date : string =
Return values
$thisdate()
public
date([string $date = ]) : $this
Parameters
- $date : string =
Return values
$thisdirectories()
public
directories() : $this
Return values
$thisdots()
public
dots([bool $ignoreDotFiles = ]) : $this
Parameters
- $ignoreDotFiles : bool =
Return values
$thisfilter()
public
filter([callable $callable = ]) : $this
Parameters
- $callable : callable =
Return values
$thisfollowSymlinks()
public
followSymlinks() : $this
Return values
$thisgetDefault()
Returns the default answer.
public
getDefault() : mixed
getMaxAttempts()
Gets the maximum number of attempts.
public
getMaxAttempts() : null|int
Null means an unlimited number of attempts.
Return values
null|intgetNormalizer()
Gets the normalizer for the response.
public
getNormalizer() : string|Closure
The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
Return values
string|ClosuregetQuestion()
Returns the question.
public
getQuestion() : string
Return values
stringgetResultFor()
Get the list of directory and files that match the current partial path (or its parent directory)
public
getResultFor(string $partialPath) : array<string|int, mixed>
Parameters
- $partialPath : string
Tags
Return values
array<string|int, mixed>getValidator()
Gets the validator for the question.
public
getValidator() : null|callable
Return values
null|callablemodified()
public
modified([string $date = ]) : $this
Parameters
- $date : string =
Return values
$thisowner()
public
owner([string $name = ]) : $this
Parameters
- $name : string =
Return values
$thissetMaxAttempts()
Sets the maximum number of attempts.
public
setMaxAttempts(null|int $attempts) : $this
Null means an unlimited number of attempts.
Parameters
- $attempts : null|int
Tags
Return values
$this —The current instance
setNormalizer()
Sets a normalizer for the response.
public
setNormalizer(string|Closure $normalizer) : $this
The normalizer can be a callable (a string), a closure or a class implementing __invoke.
Parameters
- $normalizer : string|Closure
Return values
$this —The current instance
setValidator()
Sets a validator for the question.
public
setValidator(null|callable $validator) : $this
Parameters
- $validator : null|callable
Return values
$this —The current instance
size()
public
size([string $size = ]) : $this
Parameters
- $size : string =
Return values
$thissort()
public
sort([callable $callable = ]) : $this
Parameters
- $callable : callable =
Return values
$thissortByName()
public
sortByName() : $this
Return values
$thissortBySize()
public
sortBySize() : $this
Return values
$thisfinderWrapperAdd()
Keep in memory Finder configuration
protected
finderWrapperAdd(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
finderWrapperInject()
Configure a Symfony Finder
protected
finderWrapperInject(Finder $finder) : mixed
Parameters
- $finder : Finder
newFinder()
Return a new Symfony Finder configured
protected
newFinder() : Finder