Documentation

FileList
in package
implements Iterator, Countable

Interfaces, Classes and Traits

Iterator
Countable

Table of Contents

$config  : Config
The config data for the run.
$ruleset  : Ruleset
The ruleset used for the run.
$ignorePatterns  : array<string|int, mixed>
An array of patterns to use for skipping files.
$files  : array<string|int, mixed>
A list of file paths that are included in the list.
$numFiles  : int
The number of files in the list.
__construct()  : void
Constructs a file list and loads in an array of file paths to process.
addFile()  : void
Add a file to the list.
count()  : int
Return the number of files in the list.
current()  : File
Get the file that is currently being processed.
key()  : void
Return the file path of the current file being processed.
next()  : void
Move forward to the next file.
rewind()  : void
Rewind the iterator to the first file.
valid()  : bool
Checks if current position is valid.
getFilterClass()  : string
Get the class name of the filter being used for the run.

Properties

$ignorePatterns

An array of patterns to use for skipping files.

protected array<string|int, mixed> $ignorePatterns = []

$files

A list of file paths that are included in the list.

private array<string|int, mixed> $files = []

$numFiles

The number of files in the list.

private int $numFiles = 0

Methods

__construct()

Constructs a file list and loads in an array of file paths to process.

public __construct(Config $config, Ruleset $ruleset) : void
Parameters
$config : Config

The config data for the run.

$ruleset : Ruleset

The ruleset used for the run.

Return values
void

addFile()

Add a file to the list.

public addFile(string $path[, File $file = null ]) : void

If a file object has already been created, it can be passed here. If it is left NULL, it will be created when accessed.

Parameters
$path : string

The path to the file being added.

$file : File = null

The file being added.

Return values
void

count()

Return the number of files in the list.

public count() : int
Return values
int

current()

Get the file that is currently being processed.

public current() : File
Return values
File

key()

Return the file path of the current file being processed.

public key() : void
Return values
void

next()

Move forward to the next file.

public next() : void
Return values
void

rewind()

Rewind the iterator to the first file.

public rewind() : void
Return values
void

valid()

Checks if current position is valid.

public valid() : bool
Return values
bool

getFilterClass()

Get the class name of the filter being used for the run.

private getFilterClass() : string
Tags
throws
DeepExitException

If the specified filter could not be found.

Return values
string

Search results