commit
d80ff1959b
|
@ -36,7 +36,6 @@ class CaptchaController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!$isOk) {
|
if (!$isOk) {
|
||||||
return $this->error($options);
|
return $this->error($options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class GregwarCaptchaExtension extends Extension
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param array $configs
|
* @param array $configs
|
||||||
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
|
* @param ContainerBuilder $container
|
||||||
*/
|
*/
|
||||||
public function load(array $configs, ContainerBuilder $container)
|
public function load(array $configs, ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
namespace Gregwar\CaptchaBundle\Generator;
|
namespace Gregwar\CaptchaBundle\Generator;
|
||||||
|
|
||||||
use Symfony\Component\Finder\Finder;
|
use Gregwar\Captcha\CaptchaBuilder;
|
||||||
|
use Gregwar\Captcha\PhraseBuilder;
|
||||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||||
use Symfony\Component\Routing\RouterInterface;
|
use Symfony\Component\Routing\RouterInterface;
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ use Gregwar\Captcha\PhraseBuilderInterface;
|
||||||
class CaptchaGenerator
|
class CaptchaGenerator
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Symfony\Component\Routing\RouterInterface
|
* @var RouterInterface
|
||||||
*/
|
*/
|
||||||
protected $router;
|
protected $router;
|
||||||
|
|
||||||
|
@ -38,12 +39,17 @@ class CaptchaGenerator
|
||||||
protected $imageFileHandler;
|
protected $imageFileHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Symfony\Component\Routing\RouterInterface $router
|
* @param RouterInterface $router
|
||||||
* @param CaptchaBuilderInterface $builder
|
* @param CaptchaBuilderInterface $builder
|
||||||
* @param ImageFileHandlerInterface $imageFileHandler
|
* @param PhraseBuilderInterface $phraseBuilder
|
||||||
|
* @param ImageFileHandler $imageFileHandler
|
||||||
*/
|
*/
|
||||||
public function __construct(RouterInterface $router, CaptchaBuilderInterface $builder, PhraseBuilderInterface $phraseBuilder, ImageFileHandler $imageFileHandler)
|
public function __construct(
|
||||||
{
|
RouterInterface $router,
|
||||||
|
CaptchaBuilderInterface $builder,
|
||||||
|
PhraseBuilderInterface $phraseBuilder,
|
||||||
|
ImageFileHandler $imageFileHandler
|
||||||
|
) {
|
||||||
$this->router = $router;
|
$this->router = $router;
|
||||||
$this->builder = $builder;
|
$this->builder = $builder;
|
||||||
$this->phraseBuilder = $phraseBuilder;
|
$this->phraseBuilder = $phraseBuilder;
|
||||||
|
@ -53,7 +59,6 @@ class CaptchaGenerator
|
||||||
/**
|
/**
|
||||||
* Get the captcha URL, stream, or filename that will go in the image's src attribute
|
* Get the captcha URL, stream, or filename that will go in the image's src attribute
|
||||||
*
|
*
|
||||||
* @param $key
|
|
||||||
* @param array $options
|
* @param array $options
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
@ -86,7 +91,6 @@ class CaptchaGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $key
|
|
||||||
* @param array $options
|
* @param array $options
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
@ -142,7 +146,6 @@ class CaptchaGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $key
|
|
||||||
* @param array $options
|
* @param array $options
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) <2011-2013> Grégoire Passault
|
Copyright (c) <2011-2015> Grégoire Passault
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
Loading…
Reference in New Issue