Elgg  Version 5.1
UploadService.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg;
4 
7 
15 
19  private $request;
20 
26  public function __construct(HttpRequest $request) {
27  $this->request = $request;
28  }
29 
37  public function getFiles(string $input_name): array {
38  return $this->request->getFiles($input_name);
39  }
40 
49  public function getFile(string $input_name, bool $check_for_validity = true): ?UploadedFile {
50  return $this->request->getFile($input_name, $check_for_validity);
51  }
52 }
$input_name
Definition: crop.php:24
$request
Definition: livesearch.php:12
__construct(HttpRequest $request)
Constructor.
getFiles(string $input_name)
Returns an array of uploaded file objects regardless of upload status/errors.
getFile(string $input_name, bool $check_for_validity=true)
Returns an single valid uploaded file object.
File upload handling service.