File
Table of Contents
Methods
- flatRequestFilesData() : array<string|int, array{name: ?string, type: ?string, tmp_name: ?string, error: int, size: ?int}>
- Return flat request files data by array with shape like $_FILES
- getRandomName() : string
- sanitizeFilename() : string|null
Methods
flatRequestFilesData()
Return flat request files data by array with shape like $_FILES
public
static flatRequestFilesData(array<string|int, mixed> $requestFilesData) : array<string|int, array{name: ?string, type: ?string, tmp_name: ?string, error: int, size: ?int}>
Parameters
- $requestFilesData : array<string|int, mixed>
Return values
array<string|int, array{name: ?string, type: ?string, tmp_name: ?string, error: int, size: ?int}>getRandomName()
public
static getRandomName([int|null $length = null ]) : string
Parameters
- $length : int|null = null
Return values
stringsanitizeFilename()
public
static sanitizeFilename(string $filename) : string|null
Parameters
- $filename : string