Completed
Pull Request — master (#95)
by
unknown
02:28
created

abstractUiElement::setY()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
ccs 0
cts 5
cp 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace eXpansion\Framework\Gui\Components;
4
5
use FML\Script\Features\ScriptFeature;
6
use FML\Types\Renderable;
7
8
abstract class abstractUiElement extends ScriptFeature implements Renderable
9
{
10
    protected $posX = 0;
11
    protected $posY = 0;
12
    protected $posZ = 0;
13
14
    /**
15
     * @param int $posX
16
     * @param int $posY
17
     * @param int $posZ
18
     */
19
    public function setPosition($posX = 0, $posY = 0, $posZ = 0)
20
    {
21
        $this->posX = $posX;
22
        $this->posY = $posY;
23
        $this->posZ = $posZ;
24
25
        return $this;
26
27
    }
28
29
    public function setX($X)
30
    {
31
        $this->posX = $X;
32
33
        return $this;
34
    }
35
36
    public function setY($Y)
37
    {
38
        $this->posY = $Y;
39
40
        return $this;
41
    }
42
43
    public function setZ($Z)
44
    {
45
        $this->posZ = $Z;
46
47
        return $this;
48
    }
49
50
    /**
51
     * Render the XML element
52
     *
53
     * @param \DOMDocument $domDocument DOMDocument for which the XML element should be rendered
54
     * @return \DOMElement
55
     */
56
    abstract public function render(\DOMDocument $domDocument);
57
58
}
59