PHP Класс Themosis\Asset\AssetFinder

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$extensions array List of URL schemes.

Открытые методы

Метод Описание
addPaths ( array $paths ) Add paths to look for assets.
find ( string $path ) : string Get the full URL path of an asset.

Защищенные методы

Метод Описание
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.

Описание методов

addPaths() публичный Метод

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

find() публичный Метод

Get the full URL path of an asset.
public find ( string $path ) : string
$path string
Результат string

findInPaths() защищенный Метод

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.
Результат string

isExternal() защищенный Метод

Check if a path is external or not.
protected isExternal ( string $path ) : boolean
$path string
Результат boolean

parsePath() защищенный Метод

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
Результат string

Описание свойств

$extensions защищенное свойство

List of URL schemes.
protected array $extensions
Результат array