BatchFileRename Libraryv1.0

BatchFileRenameOptions.php at line 342

Class BatchFileRenameOptionsFileSet

BatchFileRenameOptions
└─BatchFileRenameOptionsFileSet

public class BatchFileRenameOptionsFileSet
extends BatchFileRenameOptions

Controles the configuration options of the fileSet according wich the files will be selected.

Author:
Mohamed ELkholy
License:
LGPL
Since:
Release: 1.0

Field Summary
protected callback

$callback

Used to filter files from the fileSet using a user-defined callback which take only one paramater which is an object containing file information.

protected string

$directoryPath

Contains the full absolute path of the directory which its contents will be renamed.

protected array

$excludeExtensions

Used to exclude a specific file extension(s) from the fileSet.

protected integer

$fileSetSize

Used to limit the number of files in the fileSet. In another way it will force BatchFileRename not to rename all the files within the directory, it will rename just the defined number of files. This is useful when dealing with directories with large number of files.

protected array

$includeExtensions

Used to include a specific file extension(s) in the fileSet.

protected integer

$maximumFileNameLength

Used to exclude file names that exceeds a specific length.

protected integer

$maximumFileSize

Used to exclude files larger than this size (in bytes).

protected integer

$minimumFileNameLength

Used to exclude file names that lessens a specific length.

protected integer

$minimumFileSize

Used to exclude files smaller than this size (in bytes).

protected string

$regexPattern

Used to exclude files using a regular expression pattern which applied to the filename.

Method Summary
protected string

validateDirectoryPath(string optionValue)

Validates the 'directoryPath' option.

protected array

validateIncludeExtensions(array optionValue)

Validates the 'includeExtensions' option.

protected array

validateExcludeExtensions(array optionValue)

Validates the 'excludeExtensions' option.

protected integer

validateMinimumFileSize(integer optionValue)

Validates the 'minimumFileSize' option.

protected integer

validateMaximumFileSize(integer optionValue)

Validates the 'maximumFileSize' option.

protected integer

validateMinimumFileNameLength(integer optionValue)

Validates the 'minimumFileNameLength' option.

protected integer

validateMaximumFileNameLength(integer optionValue)

Validates the 'maximumFileNameLength' option.

protected string

validateRegexPattern(string optionValue)

Validates the 'regexPattern' option.

protected integer

validateFileSetSize(integer optionValue)

Validates the 'fileSetSize' option.

Methods inherited from BatchFileRename\BatchFileRenameOptions
__construct, getOption, getOptions, hasValue, isEmptyString, isOption, setOption, setOptions, validateBoolean, validateCallback, validateString

Field Detail

BatchFileRenameOptions.php at line 471

callback

protected callback $callback

Used to filter files from the fileSet using a user-defined callback which take only one paramater which is an object containing file information.

NULL


BatchFileRenameOptions.php at line 353

directoryPath

protected string $directoryPath

Contains the full absolute path of the directory which its contents will be renamed.

# Default value NULL


BatchFileRenameOptions.php at line 383

excludeExtensions

protected array $excludeExtensions

Used to exclude a specific file extension(s) from the fileSet.

NULL


BatchFileRenameOptions.php at line 487

fileSetSize

protected integer $fileSetSize

Used to limit the number of files in the fileSet. In another way it will force BatchFileRename not to rename all the files within the directory, it will rename just the defined number of files. This is useful when dealing with directories with large number of files.

NULL


BatchFileRenameOptions.php at line 368

includeExtensions

protected array $includeExtensions

Used to include a specific file extension(s) in the fileSet.

NULL


BatchFileRenameOptions.php at line 426

maximumFileNameLength

protected integer $maximumFileNameLength

Used to exclude file names that exceeds a specific length.

NULL


BatchFileRenameOptions.php at line 412

maximumFileSize

protected integer $maximumFileSize

Used to exclude files larger than this size (in bytes).

NULL


BatchFileRenameOptions.php at line 440

minimumFileNameLength

protected integer $minimumFileNameLength

Used to exclude file names that lessens a specific length.

NULL


BatchFileRenameOptions.php at line 398

minimumFileSize

protected integer $minimumFileSize

Used to exclude files smaller than this size (in bytes).

NULL


BatchFileRenameOptions.php at line 454

regexPattern

protected string $regexPattern

Used to exclude files using a regular expression pattern which applied to the filename.

NULL


Method Detail

BatchFileRenameOptions.php at line 497

validateDirectoryPath

protected string validateDirectoryPath(string optionValue)

Validates the 'directoryPath' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a valid directory path

BatchFileRenameOptions.php at line 524

validateIncludeExtensions

protected array validateIncludeExtensions(array optionValue)

Validates the 'includeExtensions' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a valid array

BatchFileRenameOptions.php at line 541

validateExcludeExtensions

protected array validateExcludeExtensions(array optionValue)

Validates the 'excludeExtensions' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a valid array

BatchFileRenameOptions.php at line 558

validateMinimumFileSize

protected integer validateMinimumFileSize(integer optionValue)

Validates the 'minimumFileSize' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a number

BatchFileRenameOptions.php at line 575

validateMaximumFileSize

protected integer validateMaximumFileSize(integer optionValue)

Validates the 'maximumFileSize' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a number

BatchFileRenameOptions.php at line 592

validateMinimumFileNameLength

protected integer validateMinimumFileNameLength(integer optionValue)

Validates the 'minimumFileNameLength' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a number

BatchFileRenameOptions.php at line 609

validateMaximumFileNameLength

protected integer validateMaximumFileNameLength(integer optionValue)

Validates the 'maximumFileNameLength' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a number larger than zero

BatchFileRenameOptions.php at line 626

validateRegexPattern

protected string validateRegexPattern(string optionValue)

Validates the 'regexPattern' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a valid regular expression pattern

BatchFileRenameOptions.php at line 643

validateFileSetSize

protected integer validateFileSetSize(integer optionValue)

Validates the 'fileSetSize' option.

Throws:
InvalidArgumentException - if the supplied paramater is not a number larger than zero