PHP Class Themosis\Asset\AssetFinder

Afficher le fichier Open project: themosis/framework Class Usage Examples

Protected Properties

Свойство Type Description
$extensions array List of URL schemes.

Méthodes publiques

Méthode Description
addPaths ( array $paths ) Add paths to look for assets.
find ( string $path ) : string Get the full URL path of an asset.

Méthodes protégées

Méthode Description
findInPaths ( string $path, array $dirs ) : string Look for an asset file in all registered directories.
isExternal ( string $path ) : boolean Check if a path is external or not.
parsePath ( string $path ) : string Sanitized the given asset path and check if there is a '/' symbol at the beginning of the path.

Method Details

addPaths() public méthode

Add paths to look for assets.
public addPaths ( array $paths )
$paths array

find() public méthode

Get the full URL path of an asset.
public find ( string $path ) : string
$path string
Résultat string

findInPaths() protected méthode

Look for an asset file in all registered directories.
protected findInPaths ( string $path, array $dirs ) : string
$path string The relative path.
$dirs array Registered asset directories.
Résultat string

isExternal() protected méthode

Check if a path is external or not.
protected isExternal ( string $path ) : boolean
$path string
Résultat boolean

parsePath() protected méthode

Sanitized the given asset path and check if there is a '/' symbol at the beginning of the path.
protected parsePath ( string $path ) : string
$path string
Résultat string

Property Details

$extensions protected_oe property

List of URL schemes.
protected array $extensions
Résultat array