class FileExcluder implements FilterInterface (View source)

Filter out files accordingly to their type.

Constants

EXCLUDE_NONE

Files to exclude: none.

EXCLUDE_ALL

Files to exclude: all.

EXCLUDE_DOT

Files to exclude: files that start with a dot.

EXCLUDE_POT

Files to exclude: translation dictionary files (.pot).

EXCLUDE_PO

Files to exclude: translation source files (.po).

EXCLUDE_SVGICON

Files to exclude: icons in SVG format (.svg) for package, themes, block types.

EXCLUDE_COMPOSER_JSON

Files to exclude: composer.json files.

EXCLUDE_COMPOSER_LOCK

Files to exclude: composer.json and composer.lock files.

Properties

protected int $excludeFiles

The EXCLUDE_... bit flags.

protected OutputInterface $output

Methods

__construct(int $excludeFiles, OutputInterface $output)

Initialize the instance.

apply(PackerFile $file)

Process a file/directory.

string|null
getExclusionReason(PackerFile $file)

Should a file be excluded accordingly to the configured flags?

Details

__construct(int $excludeFiles, OutputInterface $output)

Initialize the instance.

Parameters

int $excludeFiles

the EXCLUDE_... bit flags

OutputInterface $output

PackerFile[] apply(PackerFile $file)

Process a file/directory.

Parameters

PackerFile $file

the file to be processed

Return Value

PackerFile[]

the resulting list of files after processing

See also

FilterInterface::apply

protected string|null getExclusionReason(PackerFile $file)

Should a file be excluded accordingly to the configured flags?

Parameters

PackerFile $file

Return Value

string|null

a message describing why a file is excluded, or NULL if the file shouldn't be excluded