/
NoCaptchaController.php
75 lines (66 loc) · 1.52 KB
/
NoCaptchaController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
namespace Concrete\Core\Captcha;
use Concrete\Core\Controller\AbstractController;
use Concrete\Core\Http\ResponseFactoryInterface;
/**
* Captcha controller used when there's no active captcha library.
*/
class NoCaptchaController extends AbstractController implements CaptchaWithPictureInterface
{
/**
* @var ResponseFactoryInterface
*/
protected $responseFactory;
/**
* Initialize the instance.
*
* @param ResponseFactoryInterface $responseFactory
*/
public function __construct(ResponseFactoryInterface $responseFactory)
{
parent::__construct();
$this->responseFactory = $responseFactory;
}
/**
* {@inheritdoc}
*
* @see \Concrete\Core\Captcha\CaptchaInterface::label()
*/
public function label()
{
}
/**
* {@inheritdoc}
*
* @see \Concrete\Core\Captcha\CaptchaInterface::display()
*/
public function display()
{
}
/**
* {@inheritdoc}
*
* @see \Concrete\Core\Captcha\CaptchaInterface::showInput()
*/
public function showInput()
{
}
/**
* {@inheritdoc}
*
* @see \Concrete\Core\Captcha\CaptchaInterface::check()
*/
public function check()
{
return true;
}
/**
* {@inheritdoc}
*
* @see \Concrete\Core\Captcha\CaptchaWithPictureInterface::displayCaptchaPicture()
*/
public function displayCaptchaPicture()
{
return $this->responseFactory->notFound('Captcha without image');
}
}