PHP Class Sprockets\Locator

Afficher le fichier Open project: nami-doc/sprockets-php

Méthodes publiques

Méthode Description
__construct ( $pipeline, $paths, $prefix )
getDirectoriesFor ( $ext )
getDirectory ( $name, $ext ) first-depth find. only returns 1 result
getFile ( $name, $type )
getFileListName ( )
getFilesUnder ( $name, $ext, $depth ) vomit
getNameAndExtension ( $name ) reads name and extension for a file name
getPathsHash ( )
getTypeForExt ( $ext ) : string returns the named type of an extension ie png, gif, jpg and jpeg are images, no need to have separate folders same applies to otf and ttf, they're fonts
hasDirectory ( $name )
hasFile ( $name, $type )
hasProcessedFile ( $file )
resolveFile ( $name )
save ( ) Calling file_put_contents within a destructor will cause the file to be written in SERVER_ROOT.
setDefaultExtension ( $ext ) # }
skipFile ( $file )

Private Methods

Méthode Description
findFile ( string $name, string $ext ) finds a file, whether it has many extensions or not findFile('xe', 'css') will find 'xs.css.less'

Method Details

__construct() public méthode

public __construct ( $pipeline, $paths, $prefix )

getDirectoriesFor() public méthode

public getDirectoriesFor ( $ext )

getDirectory() public méthode

first-depth find. only returns 1 result
public getDirectory ( $name, $ext )

getFile() public méthode

public getFile ( $name, $type )

getFileListName() public méthode

public getFileListName ( )

getFilesUnder() public méthode

vomit
public getFilesUnder ( $name, $ext, $depth )

getNameAndExtension() public méthode

reads name and extension for a file name
public getNameAndExtension ( $name )

getPathsHash() public méthode

public getPathsHash ( )

getTypeForExt() public méthode

returns the named type of an extension ie png, gif, jpg and jpeg are images, no need to have separate folders same applies to otf and ttf, they're fonts
public getTypeForExt ( $ext ) : string
Résultat string ext's named type, or extension itself

hasDirectory() public méthode

public hasDirectory ( $name )

hasFile() public méthode

public hasFile ( $name, $type )

hasProcessedFile() public méthode

public hasProcessedFile ( $file )

resolveFile() public méthode

public resolveFile ( $name )

save() public méthode

..
public save ( )

setDefaultExtension() public méthode

# }
public setDefaultExtension ( $ext )

skipFile() public méthode

public skipFile ( $file )