setDefaultCsrfFieldName() публичный статический Метод

Sets the CSRF field name used in all new CSRF protected forms
public static setDefaultCsrfFieldName ( string $name )
$name string The CSRF field name
Пример #1
0
 public function testDefaultCsrfFieldNameCanBeSet()
 {
     FormConfiguration::setDefaultCsrfFieldName('foobar');
     $form = new Form('author', new Author(), $this->validator);
     $form->enableCsrfProtection();
     $this->assertEquals('foobar', $form->getCsrfFieldName());
 }