private function ServerRequest::validateUploadedFiles in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-diactoros/src/ServerRequest.php \Zend\Diactoros\ServerRequest::validateUploadedFiles()
Recursively validate the structure in an uploaded files array.
Parameters
array $uploadedFiles:
Throws
InvalidArgumentException if any leaf is not an UploadedFileInterface instance.
2 calls to ServerRequest::validateUploadedFiles()
- ServerRequest::withUploadedFiles in vendor/
zendframework/ zend-diactoros/ src/ ServerRequest.php - Create a new instance with the specified uploaded files.
- ServerRequest::__construct in vendor/
zendframework/ zend-diactoros/ src/ ServerRequest.php
File
- vendor/
zendframework/ zend-diactoros/ src/ ServerRequest.php, line 284
Class
- ServerRequest
- Server-side HTTP request
Namespace
Zend\DiactorosCode
private function validateUploadedFiles(array $uploadedFiles) {
foreach ($uploadedFiles as $file) {
if (is_array($file)) {
$this
->validateUploadedFiles($file);
continue;
}
if (!$file instanceof UploadedFileInterface) {
throw new InvalidArgumentException('Invalid leaf in uploaded files structure');
}
}
}