|
@@ 53-55 (lines=3) @@
|
| 50 |
|
protected function setPosition(array $data) |
| 51 |
|
{ |
| 52 |
|
$position = [$this->getX(), $this->getY()]; |
| 53 |
|
if (isset($data['position']) && is_array($data['position']) && count($data['position']) >= 2) { |
| 54 |
|
$position = $data['position']; |
| 55 |
|
} |
| 56 |
|
if (is_integer($position[0])) { |
| 57 |
|
$this->x = $position[0]; |
| 58 |
|
} |
|
@@ 67-69 (lines=3) @@
|
| 64 |
|
protected function setSize(array $data) |
| 65 |
|
{ |
| 66 |
|
$size = [$this->getWidth(), $this->getHeight()]; |
| 67 |
|
if (isset($data['size']) && is_array($data['size']) && count($data['size']) >= 2) { |
| 68 |
|
$size = $data['size']; |
| 69 |
|
} |
| 70 |
|
if (is_integer($size[0]) && $size[0] > 0) { |
| 71 |
|
$this->width = $size[0]; |
| 72 |
|
} |