AuraInputModule::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 12
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the Ray.ValidateModule package
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
namespace Ray\Validation;
8
9
use Aura\Filter\SubjectFilter;
10
use Aura\Filter\ValueFilter;
11
use Aura\Html\HelperLocatorFactory;
12
use Aura\Input\Builder;
13
use Aura\Input\BuilderInterface;
14
use Aura\Input\Filter;
15
use Aura\Input\FilterInterface;
16
use Aura\Input\Form;
17
use Ray\Di\AbstractModule;
18
use Ray\Validation\Annotation\AuraInput;
19
20
class AuraInputModule extends AbstractModule
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected function configure()
26
    {
27
        $this->install(new ValidateModule);
28
        $this->bind(BuilderInterface::class)->to(Builder::class);
29
        $this->bind(Filter::class)->toProvider(FilterProvider::class);
30
        $this->bind(FilterInterface::class)->to(Filter::class);
31
        $this->bind(ValueFilter::class)->toProvider(ValueFilterProvider::class);
32
        $this->bind(SubjectFilter::class)->toProvider(SubjectFilterProvider::class);
33
        $this->bind(HelperLocatorFactory::class);
34
        $this->bindInterceptor(
35
            $this->matcher->any(),
36
            $this->matcher->annotatedWith(AuraInput::class),
37
            [AuraInputInterceptor::class]
38
        );
39
    }
40
}
41