Completed
Push — master ( ccf80a...5ce56d )
by WEBEWEB
01:32
created

Page::setParent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the core-library package.
5
 *
6
 * (c) 2020 WEBEWEB
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 WBW\Library\Core\ThirdParty\OcrLad\Model;
13
14
use WBW\Library\Core\Model\Attribute\IntegerHeightTrait;
15
use WBW\Library\Core\Model\Attribute\IntegerWidthTrait;
16
use WBW\Library\Core\ThirdParty\OcrLad\Model\Attribute\ArrayWordsTrait;
17
18
/**
19
 * Page.
20
 *
21
 * @author webeweb <https://github.com/webeweb>
22
 * @package WBW\Library\Core\ThirdParty\OcrLad\Model
23
 */
24
class Page {
25
26
    use ArrayWordsTrait;
27
    use IntegerHeightTrait;
28
    use IntegerWidthTrait;
29
30
    /**
31
     * Parent.
32
     *
33
     * @var Document
34
     */
35
    private $parent;
36
37
    /**
38
     * Resolution.
39
     *
40
     * @var int
41
     */
42
    private $resolution;
43
44
    /**
45
     * Rotation.
46
     *
47
     * @var int
48
     */
49
    private $rotation;
50
51
    /**
52
     * Tag.
53
     *
54
     * @var int
55
     */
56
    private $tag;
57
58
    /**
59
     * Constructor.
60
     */
61
    public function __construct() {
62
        $this->setWords([]);
63
    }
64
65
    /**
66
     * Get the parent.
67
     *
68
     * @return Document Returns the parent.
69
     */
70
    public function getParent() {
71
        return $this->parent;
72
    }
73
74
    /**
75
     * Get the resolution.
76
     *
77
     * @return int Returns the resolution.
78
     */
79
    public function getResolution() {
80
        return $this->resolution;
81
    }
82
83
    /**
84
     * Get the rotation.
85
     *
86
     * @return int Returns the rotation.
87
     */
88
    public function getRotation() {
89
        return $this->rotation;
90
    }
91
92
    /**
93
     * Get the tag.
94
     *
95
     * @return int Returns the tag.
96
     */
97
    public function getTag() {
98
        return $this->tag;
99
    }
100
101
    /**
102
     * Set the parent.
103
     *
104
     * @param Document|null $parent The parent.
105
     * @return Page Returns this page.
106
     */
107
    public function setParent(Document $parent = null) {
108
        $this->parent = $parent;
109
        return $this;
110
    }
111
112
    /**
113
     * Set the resolution.
114
     *
115
     * @param int $resolution
116
     * @return Page Returns this page.
117
     */
118
    public function setResolution($resolution) {
119
        $this->resolution = $resolution;
120
        return $this;
121
    }
122
123
    /**
124
     * Set the rotation.
125
     *
126
     * @param int $rotation The rotation.
127
     * @return Page Returns this page.
128
     */
129
    public function setRotation($rotation) {
130
        $this->rotation = $rotation;
131
        return $this;
132
    }
133
134
    /**
135
     * Set the tag.
136
     *
137
     * @param int $tag The tag.
138
     * @return Page Returns this page.
139
     */
140
    public function setTag($tag) {
141
        $this->tag = $tag;
142
        return $this;
143
    }
144
145
}