summaryrefslogtreecommitdiffstats
path: root/Http/HttpUtils.php
diff options
context:
space:
mode:
Diffstat (limited to 'Http/HttpUtils.php')
-rw-r--r--Http/HttpUtils.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/Http/HttpUtils.php b/Http/HttpUtils.php
index 0f47809..ed737a2 100644
--- a/Http/HttpUtils.php
+++ b/Http/HttpUtils.php
@@ -11,7 +11,6 @@
namespace Symfony\Component\Security\Http;
-use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
@@ -19,6 +18,7 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
+use Symfony\Component\Security\Core\Security;
/**
* Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs.
@@ -71,19 +71,19 @@ class HttpUtils
*/
public function createRequest(Request $request, $path)
{
- $newRequest = $request::create($this->generateUri($request, $path), 'get', array(), $request->cookies->all(), array(), $request->server->all());
+ $newRequest = Request::create($this->generateUri($request, $path), 'get', array(), $request->cookies->all(), array(), $request->server->all());
if ($request->hasSession()) {
$newRequest->setSession($request->getSession());
}
- if ($request->attributes->has(SecurityContextInterface::AUTHENTICATION_ERROR)) {
- $newRequest->attributes->set(SecurityContextInterface::AUTHENTICATION_ERROR, $request->attributes->get(SecurityContextInterface::AUTHENTICATION_ERROR));
+ if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) {
+ $newRequest->attributes->set(Security::AUTHENTICATION_ERROR, $request->attributes->get(Security::AUTHENTICATION_ERROR));
}
- if ($request->attributes->has(SecurityContextInterface::ACCESS_DENIED_ERROR)) {
- $newRequest->attributes->set(SecurityContextInterface::ACCESS_DENIED_ERROR, $request->attributes->get(SecurityContextInterface::ACCESS_DENIED_ERROR));
+ if ($request->attributes->has(Security::ACCESS_DENIED_ERROR)) {
+ $newRequest->attributes->set(Security::ACCESS_DENIED_ERROR, $request->attributes->get(Security::ACCESS_DENIED_ERROR));
}
- if ($request->attributes->has(SecurityContextInterface::LAST_USERNAME)) {
- $newRequest->attributes->set(SecurityContextInterface::LAST_USERNAME, $request->attributes->get(SecurityContextInterface::LAST_USERNAME));
+ if ($request->attributes->has(Security::LAST_USERNAME)) {
+ $newRequest->attributes->set(Security::LAST_USERNAME, $request->attributes->get(Security::LAST_USERNAME));
}
return $newRequest;