Definitions

File definitions helper.

 class Winter\Storm\Filesystem\Definitions

Contains file extensions for common use cases.

Methods

public final __construct ()

Lock down the constructor for this class.

Returns
mixed

public static get (string $type) : array

Entry point to request a definition set.

Parameters
Property Description
$type
string
Returns
array

public getDefinitions (string $type) : array

Returns a definition set from config or from the default sets.

Parameters
Property Description
$type
string
Returns
array

public static isPathIgnored (string $path) : bool

Determines if a path should be ignored based on the ignoreFiles and ignorePatterns definitions.

Returns true if the path is ignored, false otherwise.

Parameters
Property Description
$path
string
Returns
bool

protected assetExtensions () : array

Extensions seen as public assets.

This list can be customized with config:

cms.fileDefinitions.assetExtensions

Returns
array

protected audioExtensions () : array

Extensions typically used as audio files.

This list can be customized with config:

cms.fileDefinitions.audioExtensions

Returns
array

protected defaultExtensions () : array

Extensions that are particularly benign.

This list can be customized with config:

cms.fileDefinitions.defaultExtensions

Returns
array

protected ignoreFiles () : array

Files that can be safely ignored.

This list can be customized with the config:

cms.fileDefinitions.ignoreFiles

Returns
array

protected ignorePatterns () : array

File patterns that can be safely ignored.

This list can be customized with the config:

cms.fileDefinitions.ignorePatterns

Returns
array

protected imageExtensions () : array

Extensions typically used as images.

This list can be customized with config:

cms.fileDefinitions.imageExtensions

Returns
array

protected videoExtensions () : array

Extensions typically used as video files.

This list can be customized with config:

cms.fileDefinitions.videoExtensions

Returns
array
Copyright © 2024 Winter CMS