Completed
Push — feature/EVO-5751-text-index-mo... ( 6b6245 )
by
unknown
62:13
created

Target::getTextSearchIndex()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Part of JSON definition
4
 */
5
namespace Graviton\GeneratorBundle\Definition\Schema;
6
7
/**
8
 * JSON definition "target"
9
 *
10
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
11
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
12
 * @link     http://swisscom.ch
13
 */
14
class Target
15
{
16
    /**
17
     * @var Relation[]
18
     */
19
    private $relations = [];
20
    /**
21
     * @var Field[]
22
     */
23
    private $fields = [];
24
25
    /**
26
     * @var string[]
27
     */
28
    private $indexes = [];
29
30
    /**
31
     * @var array
32
     */
33
    private $textSearchIndex = [];
34
35
    /**
36
     * @return Relation[]
37
     */
38
    public function getRelations()
39
    {
40
        return $this->relations;
41
    }
42
43
    /**
44
     * @param Relation[] $relations Relations
45
     * @return $this
46
     */
47
    public function setRelations(array $relations)
48
    {
49
        $this->relations = $relations;
50
        return $this;
51
    }
52
53
    /**
54
     * @param Relation $relation Relation
55
     * @return $this
56
     */
57
    public function addRelation(Relation $relation)
58
    {
59
        $this->relations[] = $relation;
60
        return $this;
61
    }
62
63
    /**
64
     * @return Field[]
65
     */
66
    public function getFields()
67
    {
68
        return $this->fields;
69
    }
70
71
    /**
72
     * @param Field[] $fields Fields
73
     * @return $this
74
     */
75
    public function setFields(array $fields)
76
    {
77
        $this->fields = $fields;
78
        return $this;
79
    }
80
81
    /**
82
     * @param Field $field Field
83
     * @return $this
84
     */
85
    public function addField(Field $field)
86
    {
87
        $this->fields[] = $field;
88
        return $this;
89
    }
90
91
    /**
92
     * @param string[] $indexes indexes from json def
93
     * @return $this
94
     */
95
    public function setIndexes($indexes)
96
    {
97
        $this->indexes = $indexes;
98
        return $this;
99
    }
100
101
    /**
102
     * @return string[]
103
     */
104
    public function getIndexes()
105
    {
106
        return $this->indexes;
107
    }
108
109
    /**
110
     * @param array $textSearchIndex textSearchIndex definition from json def
111
     * @return $this
112
     */
113
    public function setTextSearchIndex($textSearchIndex)
114
    {
115
        $this->textSearchIndex = $textSearchIndex;
116
        return $this;
117
    }
118
119
    /**
120
     * @return array
121
     */
122
    public function getTextSearchIndex()
123
    {
124
        return $this->textSearchIndex;
125
    }
126
}
127