Passed
Pull Request — master (#72)
by
unknown
08:48
created

Page::getWidth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
5
 *
6
 * This file is part of the Kitodo and TYPO3 projects.
7
 *
8
 * @license GNU General Public License version 3 or later.
9
 * For the full copyright and license information, please read the
10
 * LICENSE.txt file that was distributed with this source code.
11
 */
12
13
namespace Kitodo\Dlf\Common\SolrSearchResult;
14
15
/**
16
 * Page class for the 'dlf' extension. It keeps page in which search phrase was found.
17
 *
18
 * @author Beatrycze Volk <[email protected]>
19
 * @package TYPO3
20
 * @subpackage dlf
21
 * @access public
22
 */
23
class Page
24
{
25
26
    /**
27
     * The identifier of the page
28
     *
29
     * @var int
30
     * @access private
31
     */
32
    private $id;
33
34
    /**
35
     * The name of the page
36
     *
37
     * @var string
38
     * @access private
39
     */
40
    private $name;
41
42
    /**
43
     * The width of found page
44
     *
45
     * @var int
46
     * @access private
47
     */
48
    private $width;
49
50
    /**
51
     * The height of found page
52
     *
53
     * @var int
54
     * @access private
55
     */
56
    private $height;
57
58
    /**
59
     * The constructor for region.
60
     *
61
     * @access public
62
     *
63
     * @param int $id: Id of found page properties
64
     * @param array $page: Array of found page properties
65
     *
66
     * @return void
67
     */
68
    public function __construct($id, $page)
69
    {
70
        $this->id = $id;
71
        $this->name = $page['id'];
72
        $this->width = $page['width'];
73
        $this->height = $page['height'];
74
    }
75
76
    /**
77
     * Get the page's identifier.
78
     *
79
     * @access public
80
     *
81
     * @return int The page's identifier
82
     */
83
    public function getId()
84
    {
85
        return $this->id;
86
    }
87
88
    /**
89
     * Get the page's name.
90
     *
91
     * @access public
92
     *
93
     * @return string The page's name
94
     */
95
    public function getName()
96
    {
97
        return $this->name;
98
    }
99
100
    /**
101
     * Get the page's width.
102
     *
103
     * @access public
104
     *
105
     * @return int The page's width
106
     */
107
    public function getWidth()
108
    {
109
        return $this->width;
110
    }
111
112
    /**
113
     * Get the page's height.
114
     *
115
     * @access public
116
     *
117
     * @return int The page's height
118
     */
119
    public function getHeight()
120
    {
121
        return $this->height;
122
    }
123
}
124