Myfiles
in package
implements
ControllerInterface
Controlador para servir archivos de MyFiles, aplicando tokens salvo en la carpeta pública.
Table of Contents
Interfaces
Properties
- $filePath : string
Methods
- __construct() : mixed
- getPageData() : array<string|int, mixed>
- isFileSafe() : bool
- run() : void
- getMime() : string
- isPathInsideFolder() : bool
- shouldForceDownload() : bool
Properties
$filePath
private
string
$filePath
= ''
Methods
__construct()
public
__construct(string $className[, string $url = '' ]) : mixed
Parameters
- $className : string
- $url : string = ''
getPageData()
public
getPageData() : array<string|int, mixed>
Return values
array<string|int, mixed>isFileSafe()
public
static isFileSafe(string $filePath) : bool
Parameters
- $filePath : string
Return values
boolrun()
public
run() : void
getMime()
private
getMime(string $filePath) : string
Parameters
- $filePath : string
Return values
stringisPathInsideFolder()
private
isPathInsideFolder(string $filePath, string $folder) : bool
Parameters
- $filePath : string
- $folder : string
Return values
boolshouldForceDownload()
private
shouldForceDownload(string $filePath) : bool
Parameters
- $filePath : string