src/ServerRequest.php
private function parseUploadedFiles($files)
	{
		// Empty
		$first = reset($files);

		// Single
		if (!is_array($first)) {
			return $this->parseSingleUploadedFiles($files);
		}

		// Multiple
		if (count(array_filter(array_keys($first), 'is_string')) === 0) {
			return $this->parseMultipleUploadedFiles($files);
		}

		// Namespace
		return $this->initUploadedFiles($files);
	}
private function parseUploadedFiles($files)
	{
		// Empty
		$first = reset($files);

		// Single
		if (!is_array($first)) {
			return $this->parseSingleUploadedFiles($files);
		}

		// Multiple
		if (count(array_filter(array_keys($first), 'is_string')) === 0) {
			return $this->parseMultipleUploadedFiles($files);
		}

		// Namespace
		return $this->initUploadedFiles($files);
	}
Parse uploaded files.

@param array $files
@return UploadedFile|array uploaded files.