Completed
Push — master ( daab91...b549ed )
by Derek Stephen
02:54 queued 11s
created

Captcha::getCaptchAdapter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Del\Form\Field;
4
5
use Del\Form\Field\Captcha\CaptchaAdapterInterface;
6
use Del\Form\Filter\Adapter\FilterAdapterZf;
7
use Del\Form\Renderer\Field\CaptchaRender;
8
use Zend\Filter\StringTrim;
9
use Zend\Filter\StripTags;
10
11
class Captcha extends Text
12
{
13
    /** @var CaptchaAdapterInterface $captchAdapter */
14
    private $captchaAdapter;
15
16
    public function init(): void
17
    {
18
        parent::init();
19
        $this->setRenderer(new CaptchaRender());
20
    }
21
22
    /**
23
     * @param CaptchaAdapterInterface $captchaAdapter
24
     */
25
    public function setCaptchaAdapter(CaptchaAdapterInterface $captchaAdapter): void
26
    {
27
        $this->captchaAdapter = $captchaAdapter;
28
    }
29
30
    /**
31
     * @return CaptchaAdapterInterface
32
     */
33
    public function getCaptchAdapter(): CaptchaAdapterInterface
34
    {
35
        return $this->captchaAdapter;
36
    }
37
}