src/web/UploadHandler.php
private function load_files_recursive($key, $names, $tmp_names, $types, $sizes, $errors) {
        if (is_array($names)) {
            foreach ($names as $i => $name) {
                static::load_files_recursive($key . '[' . $i . ']', $name, $tmp_names[$i], $types[$i], $sizes[$i], $errors[$i]);
            }
        } elseif ((int)$errors !== UPLOAD_ERR_NO_FILE) {
            $this->_files[$key] = new UploadedFile([
                'name' => $names,
                'tmp_name' => $tmp_names,
                'type' => $types,
                'size' => $sizes,
                'error' => $errors,
            ]);
        }
    }
private function load_files_recursive($key, $names, $tmp_names, $types, $sizes, $errors) {
        if (is_array($names)) {
            foreach ($names as $i => $name) {
                static::load_files_recursive($key . '[' . $i . ']', $name, $tmp_names[$i], $types[$i], $sizes[$i], $errors[$i]);
            }
        } elseif ((int)$errors !== UPLOAD_ERR_NO_FILE) {
            $this->_files[$key] = new UploadedFile([
                'name' => $names,
                'tmp_name' => $tmp_names,
                'type' => $types,
                'size' => $sizes,
                'error' => $errors,
            ]);
        }
    }
private function load_files_recursive ( $ key , $ names , $ tmp_names , $ types , $ sizes , $ errors ) { if ( is_array ( $ names ) ) { foreach ( $ names as $ i => $ name ) { static :: load_files_recursive ( $ key . '[' . $ i . ']' , $ name , $ tmp_names [ $ i ] , $ types [ $ i ] , $ sizes [ $ i ] , $ errors [ $ i ] ) ; } } elseif ( ( int ) $ errors !== UPLOAD_ERR_NO_FILE ) { $ this -> _files [ $ key ] = new UploadedFile ( [ 'name' => $ names , 'tmp_name' => $ tmp_names , 'type' => $ types , 'size' => $ sizes , 'error' => $ errors , ] ) ; } }
Creates UploadedFile instances from $_FILE recursively.
@param string $key key for identifying uploaded file: class name and sub-array indexes
@param mixed $names file names provided by PHP
@param mixed $tmp_names temporary file names provided by PHP
@param mixed $types file types provided by PHP
@param mixed $sizes file sizes provided by PHP
@param mixed $errors uploading issues provided by PHP
Creates UploadedFile instances from $_FILE recursively .