* * 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:----YCEv8Xj19UQdIo/0B/LiPeFae021BtRBDqKCcSqFPsuUzKmITCfuCb3kZq0dWTgTl13u92fJFNLLakYt1t5oXXIETQD60Ka8UxiCVPSdUqVg8D0fAe17Cp2iw+jZNmkrd9n5Yf/a4bPqp5AscztzYItG7ikpv9mlC0TLFN+Dwtonw/ScoGeQscduvU/xOQMA2Eo2dcfFClUR8DG1ArAKe9unNeFhk6/95l1OWTrFe/3yc/OEwaExvaFxZVgLI28iyHWvAjDB65d69BdDTnX2oOCUwdlCeBinGU4GGAVo3n+qQvKhL0rj7DtCwt5132XP8Ad/ecPi9whieBsCxYTKNFsNH48rh3BxhRqKrK4xWoThSJMnGjR5tXSN1/qtejfWYdt6k5/JSLb8ilR8JqV9LeHcjxzSNzSs9gRSIiw15v4vjxd+TV4HMLNgG2gknTYRSM2O22Jcafwix4+CcZlJs4HeB2cg4L4ceFyqJh1YFIJl53oqEDof7+rFaLj+LH70tPA2RlX1LVc8pi8Eq662mIGy5iOwrQO6oSyRjvH3Fyn935yYVlwVRwbfYG6XQPfhyJqgbCo2F3JEsdcwz73Om/4pCtJGx3gubjY8E86AMuELzOU6YNMPVb3wJ+yCNdzkA0AQZwaUi8gBlktPkX7ymRvWrQWRgLBwFU8qoCHOpm4=----ATTACHMENT:----ODc3Mjk1MDY5MDI5MTAzMiA5NzIxMzE5NjA4OTU2MTUyIDQ0MTE0NzM3MTMxOTczMTc=