protected function createFileObject(array $array)
	{
		if (! isset($array['name']))
		{
			$output = [];

			foreach ($array as $key => $values)
			{
				if (! is_array($values))
				{
					continue;
				}

				$output[$key] = $this->createFileObject($values);
			}

			return $output;
		}

		return new UploadedFile(
				$array['tmp_name'] ?? null, $array['name'] ?? null, $array['type'] ?? null, $array['size'] ?? null, $array['error'] ?? null
		);
	}
protected function createFileObject(array $array)
	{
		if (! isset($array['name']))
		{
			$output = [];

			foreach ($array as $key => $values)
			{
				if (! is_array($values))
				{
					continue;
				}

				$output[$key] = $this->createFileObject($values);
			}

			return $output;
		}

		return new UploadedFile(
				$array['tmp_name'] ?? null, $array['name'] ?? null, $array['type'] ?? null, $array['size'] ?? null, $array['error'] ?? null
		);
	}
protected function createFileObject ( array $ array ) { if ( ! isset ( $ array [ 'name' ] ) ) { $ output = [ ] ; foreach ( $ array as $ key => $ values ) { if ( ! is_array ( $ values ) ) { continue ; } $ output [ $ key ] = $ this -> createFileObject ( $ values ) ; } return $ output ; } return new UploadedFile ( $ array [ 'tmp_name' ] ?? null , $ array [ 'name' ] ?? null , $ array [ 'type' ] ?? null , $ array [ 'size' ] ?? null , $ array [ 'error' ] ?? null ) ; }
Given a file array, will create UploadedFile instances. Will
loop over an array and create objects for each.

@param array $array

@return array|UploadedFile
Given a file array will create UploadedFile instances . Will loop over an array and create objects for each .