lib/custom/src/MW/View/Helper/Request/Laravel5.php
protected function createRequest( \Illuminate\Http\Request $nativeRequest )
	{
		$files = ServerRequestFactory::normalizeFiles( $this->getFiles( $nativeRequest->files->all() ) );
		$server = ServerRequestFactory::normalizeServer( $nativeRequest->server->all() );
		$headers = $nativeRequest->headers->all();
		$cookies = $nativeRequest->cookies->all();
		$post = $nativeRequest->request->all();
		$query = $nativeRequest->query->all();
		$method = $nativeRequest->getMethod();
		$uri = $nativeRequest->getUri();

		$body = new Stream( 'php://temp', 'wb+' );
		$body->write( $nativeRequest->getContent() );

		$request = new ServerRequest( $server, $files, $uri, $method, $body, $headers, $cookies, $query, $post );

		foreach( $nativeRequest->attributes->all() as $key => $value ) {
			$request = $request->withAttribute( $key, $value );
		}

		return $request;
	}
protected function createRequest( \Illuminate\Http\Request $nativeRequest )
	{
		$files = ServerRequestFactory::normalizeFiles( $this->getFiles( $nativeRequest->files->all() ) );
		$server = ServerRequestFactory::normalizeServer( $nativeRequest->server->all() );
		$headers = $nativeRequest->headers->all();
		$cookies = $nativeRequest->cookies->all();
		$post = $nativeRequest->request->all();
		$query = $nativeRequest->query->all();
		$method = $nativeRequest->getMethod();
		$uri = $nativeRequest->getUri();

		$body = new Stream( 'php://temp', 'wb+' );
		$body->write( $nativeRequest->getContent() );

		$request = new ServerRequest( $server, $files, $uri, $method, $body, $headers, $cookies, $query, $post );

		foreach( $nativeRequest->attributes->all() as $key => $value ) {
			$request = $request->withAttribute( $key, $value );
		}

		return $request;
	}
protected function createRequest ( \ Illuminate \ Http \ Request $ nativeRequest ) { $ files = ServerRequestFactory :: normalizeFiles ( $ this -> getFiles ( $ nativeRequest -> files -> all ( ) ) ) ; $ server = ServerRequestFactory :: normalizeServer ( $ nativeRequest -> server -> all ( ) ) ; $ headers = $ nativeRequest -> headers -> all ( ) ; $ cookies = $ nativeRequest -> cookies -> all ( ) ; $ post = $ nativeRequest -> request -> all ( ) ; $ query = $ nativeRequest -> query -> all ( ) ; $ method = $ nativeRequest -> getMethod ( ) ; $ uri = $ nativeRequest -> getUri ( ) ; $ body = new Stream ( 'php://temp' , 'wb+' ) ; $ body -> write ( $ nativeRequest -> getContent ( ) ) ; $ request = new ServerRequest ( $ server , $ files , $ uri , $ method , $ body , $ headers , $ cookies , $ query , $ post ) ; foreach ( $ nativeRequest -> attributes -> all ( ) as $ key => $ value ) { $ request = $ request -> withAttribute ( $ key , $ value ) ; } return $ request ; }
Transforms a Symfony request into a PSR-7 request object

@param \Illuminate\Http\Request $nativeRequest Laravel request object
@return \Psr\Http\Message\ServerRequestInterface PSR-7 request object
Transforms a Symfony request into a PSR - 7 request object