Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / vendor / symfony / serializer / Exception / ExtraAttributesException.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Serializer\Exception;
13
14 /**
15  * ExtraAttributesException.
16  *
17  * @author Julien DIDIER <julien@didier.io>
18  */
19 class ExtraAttributesException extends RuntimeException
20 {
21     private $extraAttributes;
22
23     public function __construct(array $extraAttributes, \Exception $previous = null)
24     {
25         $msg = sprintf('Extra attributes are not allowed ("%s" are unknown).', implode('", "', $extraAttributes));
26
27         $this->extraAttributes = $extraAttributes;
28
29         parent::__construct($msg, 0, $previous);
30     }
31
32     /**
33      * Get the extra attributes that are not allowed.
34      *
35      * @return array
36      */
37     public function getExtraAttributes()
38     {
39         return $this->extraAttributes;
40     }
41 }