Elgg  Version 2.3
UploadService.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg;
4 
8 
18 
22  private $request;
23 
29  public function __construct(Request $request) {
30  $this->request = $request;
31  }
32 
39  public function getUploadedFiles($input_name) {
40  $file_bag = $this->request->files;
41  if (!$file_bag->has($input_name)) {
42  return false;
43  }
44 
45  $files = $file_bag->get($input_name);
46  if (!$files) {
47  return [];
48  }
49  if (!is_array($files)) {
50  $files = [$files];
51  }
52  return $files;
53  }
54 }
getUploadedFiles($input_name)
Returns an array of uploaded file objects regardless of upload status/errors.
Elgg HTTP request.
Definition: Request.php:12
$input_name
Definition: item.php:14
Save menu items.
__construct(Request $request)
Constructor.
foreach($resources as $id=> $href) if(!empty($resources_html)) $files
Definition: details.php:141
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:5
WARNING: API IN FLUX.