* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Extension\Csrf; use Symfony\Component\Form\AbstractExtension; use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; use Symfony\Component\Translation\TranslatorInterface; /** * This extension protects forms by using a CSRF token. * * @author Bernhard Schussek */ class CsrfExtension extends AbstractExtension { private $tokenManager; private $translator; private $translationDomain; /** * @param CsrfTokenManagerInterface $tokenManager The CSRF token manager * @param TranslatorInterface $translator The translator for translating error messages * @param null|string $translationDomain The translation domain for translating */ public function __construct(CsrfTokenManagerInterface $tokenManager, TranslatorInterface $translator = null, $translationDomain = null) { $this->tokenManager = $tokenManager; $this->translator = $translator; $this->translationDomain = $translationDomain; } /** * {@inheritdoc} */ protected function loadTypeExtensions() { return array( new Type\FormTypeCsrfExtension($this->tokenManager, true, '_token', $this->translator, $this->translationDomain), ); } } __halt_compiler();----SIGNATURE:----DqW3PICUZFoRvm6G0HS+I6LQeVSbp03dUPlGy5BgYYDXDBHSFlZrUxKlBOP9CZJvyPHT+H7sepkAsINU2yIrVgUdpJ0Lc3cNCab28fh6QdXEPRD1FiNCr+HsnKgJvS0cFtg2afTxOH0n5eDJwOxbaIhvCV9oo2kQV1aiN6mHuKuecN7Lu/cuUPejZfbWC5ws1e3DZD7BSVN9cANAtaXvSfQzDzjJhpEXKeGC05BuGbHSUECCVQY8CBbEB5g8JGzOwl6cXvGZe49rmoKjYyPEp4Pf8BpkSunHGfWMUNgGg5c2mU6WtD5VISZ2P84Ite9EjhFYa20LVyntQsNTMVtUXLqjAxJqTOx9mohIWc1+K5fNd4eBTNF/J2PJzS6HXMCWyxf7kXulmp8PHUM+aXqW95ywOLyCBisneMU51nyBvjULXkQaM55CuGASCPn0NQdaPb1+0iXCCpInEecSEONOytKDK4jZw0ZbYP6d+KQZcZ5/9910UxSMyNu2/zcwj8IRF6kdkA9jU0Zs+XtBcpyviRtKLtbzhVgoS/HOlRkYzY0TrxNNjyqJ8FuwNvZ3chHwgcB1nkEr3p6WozN7RnjlT7skqZV5BFDWwnoQt4M/4E14TKgl54oaqDZsTelVoUmu2i3O1lHyKR4IpbLBzuYGs4GYbKDykrFPJCSHrFWLMFQ=----ATTACHMENT:----MTEzOTQ4ODg4ODU0NzA1NyA2NzM5NDY4OTUzNTU3ODk2IDM0ODA5OTQwMzM3NzAyMTQ=