Elgg  Version 4.x
Public Member Functions | List of all members
Elgg\UploadService Class Reference

File upload handling service. More...

Public Member Functions

 __construct (HttpRequest $request)
 Constructor. More...
 
 getFiles ($input_name)
 Returns an array of uploaded file objects regardless of upload status/errors. More...
 
 getFile ($input_name, $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 ( HttpRequest  $request)

Constructor.

Parameters
\Elgg\Http\Request$requestHttp request

Definition at line 26 of file UploadService.php.

Member Function Documentation

Elgg\UploadService::getFile (   $input_name,
  $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|false

Definition at line 49 of file UploadService.php.

Elgg\UploadService::getFiles (   $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 37 of file UploadService.php.


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