Completed
Push — master ( c8b555...495984 )
by Tim
17:04
created

Faq::getCategory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Request Faq
4
 *
5
 * @author     Tim Lochmüller
6
 */
7
8
namespace HDNET\Faq\Domain\Model\Request;
9
10
/**
11
 * Request Faq
12
 */
13
class Faq extends AbstractRequest
14
{
15
16
    /**
17
     * Category
18
     *
19
     * @var \HDNET\Faq\Domain\Model\Questioncategory
20
     */
21
    protected $category;
22
23
    /**
24
     * Categories (for checkbox selection)
25
     *
26
     * @var array
27
     */
28
    protected $categories = [];
29
30
    /**
31
     * Search word
32
     *
33
     * @var string
34
     */
35
    protected $searchWord;
36
37
    /**
38
     * Set the category
39
     *
40
     * @param \HDNET\Faq\Domain\Model\Questioncategory $category
41
     */
42
    public function setCategory($category)
43
    {
44
        $this->category = $category;
45
    }
46
47
    /**
48
     * Get the category
49
     *
50
     * @return \HDNET\Faq\Domain\Model\Questioncategory
51
     */
52
    public function getCategory()
53
    {
54
        return $this->category;
55
    }
56
57
    /**
58
     * Set and trim the search word
59
     *
60
     * @param string $searchWord
61
     */
62
    public function setSearchWord($searchWord)
63
    {
64
        $this->searchWord = trim($searchWord);
65
    }
66
67
    /**
68
     * get the trim search word
69
     *
70
     * @return string
71
     */
72
    public function getSearchWord()
73
    {
74
        return trim($this->searchWord);
75
    }
76
77
    /**
78
     * @return array
79
     */
80
    public function getCategories()
81
    {
82
        return $this->categories;
83
    }
84
85
    /**
86
     * @param array $categories
87
     */
88
    public function setCategories($categories)
89
    {
90
        $this->categories = $categories;
91
    }
92
}
93