Uploader implements IErrorable
FinalYes
Table of Contents
Interfaces
Methods
- __construct() : mixed
- getErrorByCode() : Error
- Getting once error with the necessary code.
- getErrors() : array<string|int, Error>
- Getting array of errors.
- getErrorsByCode() : array<string|int, Error>
- Getting array of errors with the necessary code.
- uploadBatchFilesToUserStorage() : array<string|int, File>|null
- Uploads batch of files, which have structure like $_FILE, to user storage in default folder for uploading.
- uploadFileToUserStorage() : File|null
- Uploads file, which has structure like $_FILE, to user storage in default folder for uploading.
Methods
__construct()
public
__construct() : mixed
getErrorByCode()
Getting once error with the necessary code.
public
getErrorByCode(string $code) : Error
Parameters
- $code : string
-
Code of error.
Return values
ErrorgetErrors()
Getting array of errors.
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getErrorsByCode()
Getting array of errors with the necessary code.
public
getErrorsByCode(string $code) : array<string|int, Error>
Parameters
- $code : string
-
Code of error.
Return values
array<string|int, Error>uploadBatchFilesToUserStorage()
Uploads batch of files, which have structure like $_FILE, to user storage in default folder for uploading.
public
uploadBatchFilesToUserStorage(int $userId, array<string|int, mixed> $files[, null|int $createdBy = null ][, SecurityContext|null $securityContext = null ]) : array<string|int, File>|null
Parameters
- $userId : int
-
Target user.
- $files : array<string|int, mixed>
-
List with structure like $_FILE
- $createdBy : null|int = null
-
Id of user which will create file. If is null, then will use $userId.
- $securityContext : SecurityContext|null = null
-
Security context.
Return values
array<string|int, File>|nulluploadFileToUserStorage()
Uploads file, which has structure like $_FILE, to user storage in default folder for uploading.
public
uploadFileToUserStorage(int $userId, array<string|int, mixed> $file[, null|int $createdBy = null ][, SecurityContext|null $securityContext = null ]) : File|null
Parameters
- $userId : int
-
Target user.
- $file : array<string|int, mixed>
-
Structure like $_FILE
- $createdBy : null|int = null
-
Id of user which will create file. If is null, then will use $userId.
- $securityContext : SecurityContext|null = null
-
Security context.