diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2010-10-22 17:48:58 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2010-10-22 17:48:58 +0200 |
commit | 459534e8cca52e07607949922b588b3a33be9f39 (patch) | |
tree | 618d96efd4e16637fcbf3095d8c90cbda78a1162 | |
parent | f7ba6da23e50d09fe7061778730e07cefccc0fdd (diff) | |
download | symfony-security-459534e8cca52e07607949922b588b3a33be9f39.zip symfony-security-459534e8cca52e07607949922b588b3a33be9f39.tar.gz symfony-security-459534e8cca52e07607949922b588b3a33be9f39.tar.bz2 |
[Security] added more unit tests
-rw-r--r-- | SecurityContext.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/SecurityContext.php b/SecurityContext.php index 32f1962..9bae752 100644 --- a/SecurityContext.php +++ b/SecurityContext.php @@ -3,6 +3,7 @@ namespace Symfony\Component\Security; use Symfony\Component\Security\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Authorization\AccessDecisionManager; /* * This file is part of the Symfony package. @@ -29,12 +30,17 @@ class SecurityContext protected $token; protected $accessDecisionManager; - public function __construct($accessDecisionManager = null) + /** + * Constructor. + * + * @param AccessDecisionManager|null $accessDecisionManager An AccessDecisionManager instance + */ + public function __construct(AccessDecisionManager $accessDecisionManager = null) { $this->accessDecisionManager = $accessDecisionManager; } - protected function getUser() + public function getUser() { return null === $this->token ? null : $this->token->getUser(); } |