PHP Класс Webiny\Component\Storage\Driver\Local\LocalHelper

Наследование: use trait Webiny\Component\StdLib\SingletonTrait
Показать файл Открыть проект Примеры использования класса

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

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

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

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

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

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

Build absolute path by given $key and $directory
public buildPath ( $key, $directory, $create ) : mixed
$key
$directory
$create
Результат mixed

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

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

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

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() защищенный Метод

Returns the absolute prefix of the given path
protected getAbsolutePrefix ( string $path ) : string
$path string A normalized path
Результат string

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

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

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

.' and make sure it's not a symlink)
public normalizeDirectoryPath ( $path ) : string
$path
Результат string

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

Normalizes the given path
protected normalizePath ( string $path ) : string
$path string
Результат string