* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests\Fixtures; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; class FixedDataTransformer implements DataTransformerInterface { private $mapping; public function __construct(array $mapping) { $this->mapping = $mapping; } public function transform($value) { if (!array_key_exists($value, $this->mapping)) { throw new TransformationFailedException(sprintf('No mapping for value "%s"', $value)); } return $this->mapping[$value]; } public function reverseTransform($value) { $result = array_search($value, $this->mapping, true); if (false === $result) { throw new TransformationFailedException(sprintf('No reverse mapping for value "%s"', $value)); } return $result; } } __halt_compiler();----SIGNATURE:----R9DPp+NwOLyOni9LrhoWObo3kCuvWSM1Rt59rnqK6mMltsaVFY1jnRsUAqx9SqG0J1o2er+qQz7fKS57lW84ZKcNnfilmQLcFKC+aUvwz6RQea36b+QaamE4QYOpf/XKRQNm1O4yHYypOdgKbZ71erRoD4jEgl/9FCs7zhtc08wNJbHug4KfDt3BpkwRoKj1Y3M8+1rnxWlZGFaOS5Ts0WdcKqU9i+HizVxMlulYcaaLQUt63doe6kk1IPxVhLTi2Qwlm19RHyTPDSd79cNeYfjA4qnj0ZegRxBZgFN0XNvesKHEGKFhNyBZPVJEPHKLpT6vVtwAWx9sIU7U9XIJ5PVZsMyKLLPz79VZtTGjALLnq0BgZBW4qmESJlXpN22EvIcSGVBbRVN3ON/MU1NoPWV4hwMcYQoxcJZEF/JAnS/pzskTOe7rmUwT7Wq4ZoQgMp1bbeg9/haVIo90YCCjGUd9CPN2POT9QqdFqDICl45XxxiuTiY7qLeu03Y6TXB4FANjuCOaUGW9tm7JtAo3CJe5STpu2HfBq8hgWlL7uXc3RBaN/KnDB4ik/8Or2rgQkH4CfaGHHiN4hRyMTofAdKBUIBeRAoFax/1aK/P19zvLd5CpqX9B8OYgA7ogOClBctVqviPgqCsEGRxGNHn1oiDq1Yt9qWBBRSAEwXOCmNY=----ATTACHMENT:----MTA3NjQ1NDMwNjM3NDAzOCA1NzU1NjI0NjU1NDE0MTg4IDgyMzUxODgyNDA5NzI5MDY=