PHP Class Todaymade\Daux\DauxHelper

Afficher le fichier Open project: justinwalsh/daux.io Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
getTheme ( Config $params, string $current_url ) : array
resolveVariant ( Config $params )

Method Details

charsArray() public static méthode

Taken from Stringy
public static charsArray ( ) : array
Résultat array An array of replacements.

getCleanPath() public static méthode

./' in a path, without actually checking the path
public static getCleanPath ( string $path ) : string
$path string
Résultat string

getFile() public static méthode

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
Résultat Todaymade\Daux\Tree\Content | Tree\Raw | false

getFilenames() public static méthode

Get the possible output file names for a source file.
public static getFilenames ( Config $config, string $part ) : string[]
$config Config
$part string
Résultat string[]

getRelativePath() public static méthode

public static getRelativePath ( string $from, string $to ) : string
$from string
$to string
Résultat string

getTheme() protected static méthode

protected static getTheme ( Config $params, string $current_url ) : array
$params Config
$current_url string
Résultat array

isAbsolutePath() public static méthode

public static isAbsolutePath ( $path )

rebaseConfiguration() public static méthode

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

resolveVariant() protected static méthode

protected static resolveVariant ( Config $params )
$params Config

slug() public static méthode

Taken from Stringy
public static slug ( string $title ) : string
$title string
Résultat string