class ManifestFileFinder extends SS_FileFinder (View source)

An extension to the default file finder with some extra filters to faciliate autoload and template manifest generation:

  • Only modules with _config.php files are scanned.

  • If a _manifest_exclude file is present inside a directory it is ignored.
  • Assets and module language directories are ignored.
  • Module tests directories are skipped if the ignore_tests option is not set to false.

Constants

CONFIG_FILE

CONFIG_DIR

EXCLUDE_FILE

LANG_DIR

TESTS_DIR

Properties

protected static array $vcs_dirs from  SS_FileFinder
protected static $default_options
protected array $options from  SS_FileFinder

Methods

public
__construct()

No description

public
mixed
getOption(string $name)

Returns an option value set on this instance.

public
setOption(string $name, mixed $value)

Set an option on this finder instance. See SS_FileFinder for the list of options available.

public
setOptions(array $options)

Sets several options at once.

public
array
find(string $base)

Finds all files matching the options within a directory. The search is performed depth first.

public
bool
acceptDir($basename, $pathname, $depth)

Returns TRUE if the directory should be traversed. This can be overloaded to customise functionality, or extended with callbacks.

protected
bool
acceptFile($basename, $pathname, $depth)

Returns TRUE if the file should be included in the results. This can be overloaded to customise functionality, or extended via callbacks.

Details

__construct()

No description

mixed getOption(string $name)

Returns an option value set on this instance.

Parameters

string $name

Return Value

mixed

setOption(string $name, mixed $value)

Set an option on this finder instance. See SS_FileFinder for the list of options available.

Parameters

string $name
mixed $value

setOptions(array $options)

Sets several options at once.

Parameters

array $options

array find(string $base)

Finds all files matching the options within a directory. The search is performed depth first.

Parameters

string $base

Return Value

array

bool acceptDir($basename, $pathname, $depth)

Returns TRUE if the directory should be traversed. This can be overloaded to customise functionality, or extended with callbacks.

Parameters

$basename
$pathname
$depth

Return Value

bool

protected bool acceptFile($basename, $pathname, $depth)

Returns TRUE if the file should be included in the results. This can be overloaded to customise functionality, or extended via callbacks.

Parameters

$basename
$pathname
$depth

Return Value

bool