lib/custom/src/MW/View/Helper/Request/Laravel5.php
protected function getFiles( array $files )
	{
		$list = [];

		foreach( $files as $key => $value )
		{
			if( $value instanceof \Symfony\Component\HttpFoundation\File\UploadedFile )
			{
				$list[$key] = new \Zend\Diactoros\UploadedFile(
					$value->getRealPath(),
					$value->getSize(),
					$value->getError(),
					$value->getClientOriginalName(),
					$value->getClientMimeType()
				);
			}
			elseif( is_array( $value ) )
			{
				$list[$key] = $this->getFiles( $value );
			}
		}

		return $list;
	}
protected function getFiles( array $files )
	{
		$list = [];

		foreach( $files as $key => $value )
		{
			if( $value instanceof \Symfony\Component\HttpFoundation\File\UploadedFile )
			{
				$list[$key] = new \Zend\Diactoros\UploadedFile(
					$value->getRealPath(),
					$value->getSize(),
					$value->getError(),
					$value->getClientOriginalName(),
					$value->getClientMimeType()
				);
			}
			elseif( is_array( $value ) )
			{
				$list[$key] = $this->getFiles( $value );
			}
		}

		return $list;
	}
protected function getFiles ( array $ files ) { $ list = [ ] ; foreach ( $ files as $ key => $ value ) { if ( $ value instanceof \ Symfony \ Component \ HttpFoundation \ File \ UploadedFile ) { $ list [ $ key ] = new \ Zend \ Diactoros \ UploadedFile ( $ value -> getRealPath ( ) , $ value -> getSize ( ) , $ value -> getError ( ) , $ value -> getClientOriginalName ( ) , $ value -> getClientMimeType ( ) ) ; } elseif ( is_array ( $ value ) ) { $ list [ $ key ] = $ this -> getFiles ( $ value ) ; } } return $ list ; }
Converts Symfony uploaded files array to the PSR-7 one.

@param array $files Multi-dimensional list of uploaded files from Symfony request
@return array Multi-dimensional list of uploaded files as PSR-7 objects
Converts Symfony uploaded files array to the PSR - 7 one .