KeyConverter
in package
implements
FilenameConverterInterface
Converts filenames from one system to another
Table of Contents
Interfaces
- FilenameConverterInterface
- Converts filenames from one system to another (e.g. local to Amazon S3)
Properties
- $baseDir : string
- $delimiter : string
- $prefix : string
Methods
- __construct() : mixed
- convert() : string
- Convert a filename
Properties
$baseDir
protected
string
$baseDir
Base directory to remove from each file path before converting to an object key
$delimiter
protected
string
$delimiter
Directory separator for Amazon S3 keys
$prefix
protected
string
$prefix
Prefix to prepend to each Amazon S3 object key
Methods
__construct()
public
__construct([string $baseDir = '' ][, string $prefix = '' ][, string $delimiter = '/' ]) : mixed
Parameters
- $baseDir : string = ''
-
Base directory to remove from each converted name
- $prefix : string = ''
-
Amazon S3 prefix
- $delimiter : string = '/'
-
Directory separator used with generated names
convert()
Convert a filename
public
convert(mixed $filename) : string
Parameters
- $filename : mixed
-
Name of the file to convert