PHP Класс Todaymade\Daux\DauxHelper

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

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

Метод Описание
charsArray ( ) : array Returns the replacements for the slug() method.
getCleanPath ( string $path ) : string Remove all '/./' and '/.
getFile ( Directory $tree, string $request ) : Todaymade\Daux\Tree\Content | Tree\Raw | false Locate a file in the tree. Returns the file if found or false
getFilenames ( Config $config, string $part ) : string[] Get the possible output file names for a source file.
getRelativePath ( string $from, string $to ) : string
isAbsolutePath ( $path )
rebaseConfiguration ( Config $config, string $base_url ) Set a new base_url for the configuration
slug ( string $title ) : string Generate a URL friendly "slug" from a given string.

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

Метод Описание
getTheme ( Config $params, string $current_url ) : array
resolveVariant ( Config $params )

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

charsArray() публичный статический Метод

Taken from Stringy
public static charsArray ( ) : array
Результат array An array of replacements.

getCleanPath() публичный статический Метод

./' in a path, without actually checking the path
public static getCleanPath ( string $path ) : string
$path string
Результат string

getFile() публичный статический Метод

Locate a file in the tree. Returns the file if found or false
public static getFile ( Directory $tree, string $request ) : Todaymade\Daux\Tree\Content | Tree\Raw | false
$tree Todaymade\Daux\Tree\Directory
$request string
Результат Todaymade\Daux\Tree\Content | Tree\Raw | false

getFilenames() публичный статический Метод

Get the possible output file names for a source file.
public static getFilenames ( Config $config, string $part ) : string[]
$config Config
$part string
Результат string[]

getRelativePath() публичный статический Метод

public static getRelativePath ( string $from, string $to ) : string
$from string
$to string
Результат string

getTheme() защищенный статический Метод

protected static getTheme ( Config $params, string $current_url ) : array
$params Config
$current_url string
Результат array

isAbsolutePath() публичный статический Метод

public static isAbsolutePath ( $path )

rebaseConfiguration() публичный статический Метод

Set a new base_url for the configuration
public static rebaseConfiguration ( Config $config, string $base_url )
$config Config
$base_url string

resolveVariant() защищенный статический Метод

protected static resolveVariant ( Config $params )
$params Config

slug() публичный статический Метод

Taken from Stringy
public static slug ( string $title ) : string
$title string
Результат string