diff options
Diffstat (limited to 'Core/Exception/AccessDeniedException.php')
-rw-r--r-- | Core/Exception/AccessDeniedException.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Core/Exception/AccessDeniedException.php b/Core/Exception/AccessDeniedException.php index 736a36b..a16044f 100644 --- a/Core/Exception/AccessDeniedException.php +++ b/Core/Exception/AccessDeniedException.php @@ -18,8 +18,43 @@ namespace Symfony\Component\Security\Core\Exception; */ class AccessDeniedException extends \RuntimeException { + private $attributes = array(); + private $subject; + public function __construct($message = 'Access Denied.', \Exception $previous = null) { parent::__construct($message, 403, $previous); } + + /** + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * @param array|string $attributes + */ + public function setAttributes($attributes) + { + $this->attributes = (array) $attributes; + } + + /** + * @return mixed + */ + public function getSubject() + { + return $this->subject; + } + + /** + * @param mixed $subject + */ + public function setSubject($subject) + { + $this->subject = $subject; + } } |