Completed
Push — master ( 76ac79...60ae6d )
by Simonas
64:57
created

DependencyInjection/Filter/MatchFilterFactory.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\FilterManagerBundle\DependencyInjection\Filter;
13
14
use Symfony\Component\DependencyInjection\Definition;
15
16
/**
17
 * Factory for match filter.
18
 *
19
 * @deprecated Filter factories will be deleted in 2.0
20
 */
21
class MatchFilterFactory extends AbstractFilterFactory
0 ignored issues
show
Deprecated Code introduced by
The class ONGR\FilterManagerBundle...r\AbstractFilterFactory has been deprecated with message: Filter factories will be deleted in 2.0

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected function configure(Definition $definition, array $configuration)
27
    {
28
        parent::configure($definition, $configuration);
29
30
        !isset($configuration['field']) ? : $definition->addMethodCall('setField', [$configuration['field']]);
31
32
        !isset($configuration['operator']) ? : $definition
33
            ->addMethodCall('setOperator', [$configuration['operator']]);
34
        !isset($configuration['fuzziness']) ? : $definition
35
            ->addMethodCall('setFuzziness', [$configuration['fuzziness']]);
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    protected function getNamespace()
42
    {
43
        return 'ONGR\FilterManagerBundle\Filter\Widget\Search\MatchSearch';
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getName()
50
    {
51
        return 'match';
52
    }
53
}
54