Adding the "distortion" option

This commit is contained in:
Gregwar 2013-01-21 14:04:53 +01:00
parent 0108219264
commit c224b93033
3 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,7 @@ class Configuration implements ConfigurationInterface
->scalarNode('bypass_code')->defaultValue(null)->end()
->scalarNode('whitelist_key')->defaultValue('captcha_whitelist_key')->end()
->scalarNode('humanity')->defaultValue(0)->end()
->scalarNode('distortion')->defaultValue(true)->end()
->end()
;

View File

@ -105,6 +105,8 @@ class CaptchaGenerator
{
$fingerprint = $this->getFingerprint($key, $options);
$this->builder->setDistortion($options['distortion']);
$content = $this->builder->build(
$options['width'],
$options['height'],

View File

@ -135,6 +135,7 @@ You can define the following configuration options globally or on the CaptchaTyp
* **whitelist_key**: the session key to use for keep the session keys that can be used for captcha storage, when using as_url (default=captcha_whitelist_key)
* **reload**: adds a link to reload the code
* **humanity**: number of extra forms that the user can submit after a correct validation, if set to a value different of 0, only 1 over (1+humanity) forms will contain a CAPTCHA (default=0, i.e each form will contain the CAPTCHA)
* **distortion**: enable or disable the distortion on the image (default=true, enabled)
Example :