Elgg  Version master
Public Member Functions | List of all members
Elgg\UploadService Class Reference

File upload handling service. More...

Public Member Functions

 __construct (protected HttpRequest $request)
 Constructor. More...
 
 getFiles (string $input_name)
 Returns an array of uploaded file objects regardless of upload status/errors. More...
 
 getFile (string $input_name, bool $check_for_validity=true)
 Returns an single valid uploaded file object. More...
 

Detailed Description

File upload handling service.

Definition at line 14 of file UploadService.php.

Constructor & Destructor Documentation

Elgg\UploadService::__construct ( protected HttpRequest  $request)

Constructor.

Parameters
\Elgg\Http\Request$requestHttp request

Definition at line 21 of file UploadService.php.

Member Function Documentation

Elgg\UploadService::getFile ( string  $input_name,
bool  $check_for_validity = true 
)

Returns an single valid uploaded file object.

Parameters
string$input_nameForm input name
bool$check_for_validityIf there is an uploaded file, is it required to be valid
Returns
UploadedFile|null

Definition at line 43 of file UploadService.php.

Elgg\UploadService::getFiles ( string  $input_name)

Returns an array of uploaded file objects regardless of upload status/errors.

Parameters
string$input_nameForm input name
Returns
UploadedFile[]

Definition at line 31 of file UploadService.php.


The documentation for this class was generated from the following file: