PHP Class Yab\Quarx\Services\FileService

Exibir arquivo Open project: YABhq/Quarx Class Usage Examples

Public Methods

Method Description
fileAsDownload ( string $fileName, string $realFileName ) : string Provides a URL for the file as a download.
fileAsPublicAsset ( string $fileName ) : string Provide a URL for the file as a public asset.
filePreview ( string $fileName ) : string Provide a URL for the file as a public preview.
getFileClass ( string $file ) : string Generate a name from the file path.
saveClone ( string $fileName, $directory = '', $fileTypes = [] ) : array Saves File.
saveFile ( string $fileName, $directory = '', $fileTypes = [] ) : array Saves File.

Method Details

fileAsDownload() public static method

Provides a URL for the file as a download.
public static fileAsDownload ( string $fileName, string $realFileName ) : string
$fileName string File name
$realFileName string Real file name
return string

fileAsPublicAsset() public static method

Provide a URL for the file as a public asset.
public static fileAsPublicAsset ( string $fileName ) : string
$fileName string File name
return string

filePreview() public static method

Provide a URL for the file as a public preview.
public static filePreview ( string $fileName ) : string
$fileName string File name
return string

getFileClass() public static method

Generate a name from the file path.
public static getFileClass ( string $file ) : string
$file string File path
return string

saveClone() public static method

Saves File.
public static saveClone ( string $fileName, $directory = '', $fileTypes = [] ) : array
$fileName string File input name
return array

saveFile() public static method

Saves File.
public static saveFile ( string $fileName, $directory = '', $fileTypes = [] ) : array
$fileName string File input name
return array