ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
UploadResult.php
Go to the documentation of this file.
1 <?php
2 
3 namespace ILIAS\FileUpload\DTO;
4 
7 
20 final class UploadResult
21 {
26  private $name;
30  private $size;
34  private $mimeType;
38  private $metaData;
42  private $status;
46  private $path;
47 
48 
63  {
64  $this->stringTypeCheck($name, "name");
65  $this->stringTypeCheck($mimeType, "mimeType");
66  $this->stringTypeCheck($path, "path");
67  $this->intTypeCheck($size, "size");
68 
69  $this->name = $name;
70  $this->size = $size;
71  $this->mimeType = $mimeType;
72  $this->metaData = $metaData;
73  $this->status = $status;
74  $this->path = $path;
75  }
76 
77 
82  public function getName()
83  {
84  return $this->name;
85  }
86 
87 
92  public function getSize()
93  {
94  return $this->size;
95  }
96 
97 
102  public function getMimeType()
103  {
104  return $this->mimeType;
105  }
106 
107 
112  public function getMetaData()
113  {
114  return $this->metaData;
115  }
116 
117 
122  public function getStatus()
123  {
124  return $this->status;
125  }
126 
127 
131  public function isOK() : bool
132  {
133  return $this->status->getCode() === ProcessingStatus::OK;
134  }
135 
136 
141  public function getPath()
142  {
143  return $this->path;
144  }
145 }
__construct($name, $size, $mimeType, ImmutableStringMap $metaData, ProcessingStatus $status, $path)
UploadResult constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Metadata.php:3