Completed
Push — master ( b6358f...8c41f2 )
by Rafael
07:13
created

Classification::setMatchPatterns()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php declare(strict_types = 1);
2
namespace ApacheSolrForTypo3\Solr\Domain\Index\Classification;
3
4
/***************************************************************
5
 *  Copyright notice
6
 *
7
 *  (c) 2010-2017 dkd Internet Service GmbH <[email protected]>
8
 *  All rights reserved
9
 *
10
 *  This script is part of the TYPO3 project. The TYPO3 project is
11
 *  free software; you can redistribute it and/or modify
12
 *  it under the terms of the GNU General Public License as published by
13
 *  the Free Software Foundation; either version 2 of the License, or
14
 *  (at your option) any later version.
15
 *
16
 *  The GNU General Public License can be found at
17
 *  http://www.gnu.org/copyleft/gpl.html.
18
 *
19
 *  This script is distributed in the hope that it will be useful,
20
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 *  GNU General Public License for more details.
23
 *
24
 *  This copyright notice MUST APPEAR in all copies of the script!
25
 ***************************************************************/
26
27
28
/**
29
 * Class Classification
30
 * @package ApacheSolrForTypo3\Solr\Domain\Index\Classification
31
 */
32
class Classification {
33
34
    /**
35
     * Array of regular expressions
36
     *
37
     * @var array
38
     */
39
    protected $matchPatterns = [];
40
41
    /**
42
     * @var string
43
     */
44
    protected $mappedClass = '';
45
46
    /**
47
     * Classification constructor.
48
     */
49
    public function __construct(array $matchPatterns = [], string $mappedClass = '')
50
    {
51
        $this->matchPatterns = $matchPatterns;
52
        $this->mappedClass = $mappedClass;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function getMatchPatterns(): array
59
    {
60
        return $this->matchPatterns;
61
    }
62
63
    /**
64
     * @param array $matchPatterns
65
     */
66
    public function setMatchPatterns(array $matchPatterns)
67
    {
68
        $this->matchPatterns = $matchPatterns;
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getMappedClass(): string
75
    {
76
        return $this->mappedClass;
77
    }
78
79
    /**
80
     * @param string $mappedClass
81
     */
82
    public function setMappedClass(string $mappedClass)
83
    {
84
        $this->mappedClass = $mappedClass;
85
    }
86
}