| | |
| | | |
| | | protected int $maxUploads; |
| | | |
| | | protected function setMultiple(bool $set):void |
| | | public function setMultiple(bool $set):void |
| | | { |
| | | $this->multiple = $set; |
| | | } |
| | | protected function getMultiple():bool |
| | | public function getMultiple():bool |
| | | { |
| | | return $this->multiple; |
| | | } |
| | | |
| | | protected function setMaxUploads(int $maxUploads):void |
| | | public function setMaxUploads(int $maxUploads):void |
| | | { |
| | | $max = 20; |
| | | $this->maxUploads = min($maxUploads, $max); |
| | | } |
| | | protected function getMaxUploads():int |
| | | public function getMaxUploads():int |
| | | { |
| | | return $this->maxUploads; |
| | | } |
| | | |
| | | protected function setSubtype(string $subtype):void |
| | | public function setSubtype(string $subtype):void |
| | | { |
| | | $allowed = ['document', 'video', 'image', 'all']; |
| | | if (!in_array($subtype, $allowed)) { |
| | |
| | | } |
| | | $this->subtype = $subtype; |
| | | } |
| | | protected function getSubtype():string |
| | | public function getSubtype():string |
| | | { |
| | | return $this->subtype; |
| | | } |