Elgg  Version master
UploadService.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg;
4 
7 
15 
21  public function __construct(protected HttpRequest $request) {
22  }
23 
31  public function getFiles(string $input_name): array {
32  return $this->request->getFiles($input_name);
33  }
34 
43  public function getFile(string $input_name, bool $check_for_validity = true): ?UploadedFile {
44  return $this->request->getFile($input_name, $check_for_validity);
45  }
46 }
$input_name
Definition: crop.php:24
$request
Definition: livesearch.php:12
getFiles(string $input_name)
Returns an array of uploaded file objects regardless of upload status/errors.
__construct(protected HttpRequest $request)
Constructor.
getFile(string $input_name, bool $check_for_validity=true)
Returns an single valid uploaded file object.
File upload handling service.