add missing class. Fix #493
This commit is contained in:
43
core/lib/Thelia/Core/HttpKernel/Client.php
Normal file
43
core/lib/Thelia/Core/HttpKernel/Client.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Core\HttpKernel;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpKernel\Client as BaseClient;
|
||||||
|
use Thelia\Core\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\BrowserKit\Request as DomRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Client
|
||||||
|
* @package Thelia\Core\HttpKernel
|
||||||
|
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class Client extends BaseClient
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the BrowserKit request to a HttpKernel request.
|
||||||
|
*
|
||||||
|
* @param DomRequest $request A Request instance
|
||||||
|
*
|
||||||
|
* @return Request A Request instance
|
||||||
|
*/
|
||||||
|
protected function filterRequest(DomRequest $request)
|
||||||
|
{
|
||||||
|
$httpRequest = Request::create($request->getUri(), $request->getMethod(), $request->getParameters(), $request->getCookies(), $request->getFiles(), $request->getServer(), $request->getContent());
|
||||||
|
|
||||||
|
$httpRequest->files->replace($this->filterFiles($httpRequest->files->all()));
|
||||||
|
|
||||||
|
return $httpRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user