PHP Class Webiny\Component\Storage\Driver\Local\LocalHelper

Inheritance: use trait Webiny\Component\StdLib\SingletonTrait
Afficher le fichier Open project: Webiny/Framework Class Usage Examples

Méthodes publiques

Méthode Description
buildPath ( $key, $directory, $create ) : mixed Build absolute path by given $key and $directory
ensureDirectoryExists ( string $directory, boolean $create = false ) Make sure the target directory exists
getKey ( string $path, string $directory ) : string Gets the key using file $path and storage $directory
normalizeDirectoryPath ( $path ) : string Normalize path (strip '.', '.

Méthodes protégées

Méthode Description
createDirectory ( string $directory ) Create directory
getAbsolutePrefix ( string $path ) : string Returns the absolute prefix of the given path
normalizePath ( string $path ) : string Normalizes the given path

Method Details

buildPath() public méthode

Build absolute path by given $key and $directory
public buildPath ( $key, $directory, $create ) : mixed
$key
$directory
$create
Résultat mixed

createDirectory() protected méthode

Create directory
protected createDirectory ( string $directory )
$directory string Directory path to create

ensureDirectoryExists() public méthode

Make sure the target directory exists
public ensureDirectoryExists ( string $directory, boolean $create = false )
$directory string Path to check
$create boolean (Optional) Create path if doesn't exist

getAbsolutePrefix() protected méthode

Returns the absolute prefix of the given path
protected getAbsolutePrefix ( string $path ) : string
$path string A normalized path
Résultat string

getKey() public méthode

Gets the key using file $path and storage $directory
public getKey ( string $path, string $directory ) : string
$path string Path to extract file key from
$directory string Directory of the storage
Résultat string

normalizeDirectoryPath() public méthode

.' and make sure it's not a symlink)
public normalizeDirectoryPath ( $path ) : string
$path
Résultat string

normalizePath() protected méthode

Normalizes the given path
protected normalizePath ( string $path ) : string
$path string
Résultat string