| 1 | <?php |
||
| 8 | abstract class abstractUiElement extends ScriptFeature implements Renderable |
||
| 9 | { |
||
| 10 | protected $_classes = []; |
||
| 11 | protected $_dataAttributes = []; |
||
| 12 | protected $posX = 0; |
||
| 13 | protected $posY = 0; |
||
| 14 | protected $posZ = 0; |
||
| 15 | |||
| 16 | protected $width; |
||
| 17 | protected $height; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param int $posX |
||
| 21 | * @param int $posY |
||
| 22 | * @param int $posZ |
||
| 23 | */ |
||
| 24 | public function setPosition($posX = 0, $posY = 0, $posZ = 0) |
||
| 33 | |||
| 34 | public function setX($X) |
||
| 40 | |||
| 41 | public function setY($Y) |
||
| 47 | |||
| 48 | public function setZ($Z) |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Render the XML element |
||
| 57 | * |
||
| 58 | * @param \DOMDocument $domDocument DOMDocument for which the XML element should be rendered |
||
| 59 | * @return \DOMElement |
||
| 60 | */ |
||
| 61 | abstract public function render(\DOMDocument $domDocument); |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return int |
||
| 65 | */ |
||
| 66 | public function getX() |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return int |
||
| 73 | */ |
||
| 74 | public function getY() |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return int |
||
| 81 | */ |
||
| 82 | public function getZ() |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return mixed |
||
| 89 | */ |
||
| 90 | public function getWidth() |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @param mixed $width |
||
| 97 | */ |
||
| 98 | public function setWidth($width) |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @param mixed $height |
||
| 107 | * @return abstractUiElement |
||
| 108 | */ |
||
| 109 | public function setHeight($height) |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @return mixed |
||
| 118 | */ |
||
| 119 | public function getHeight() |
||
| 123 | |||
| 124 | public function setSize($x, $y) |
||
| 129 | |||
| 130 | public function addDataAttribute($name, $value) |
||
| 134 | |||
| 135 | public function addClass($name) |
||
| 139 | |||
| 140 | } |
||
| 141 |