src/Core/Shaders/Flat.php 1 location
|
@@ 64-71 (lines=8) @@
|
| 61 |
|
*/ |
| 62 |
|
public $width = '640'; |
| 63 |
|
|
| 64 |
|
public function removeDefaultDOMAttributes() |
| 65 |
|
{ |
| 66 |
|
$defaults = get_class_vars(get_class($this)); |
| 67 |
|
foreach (get_object_vars($this) as $name => $value) { |
| 68 |
|
if (empty($value) || (array_key_exists($name, $defaults) && $value === $defaults[$name])) |
| 69 |
|
unset($this->$name); |
| 70 |
|
} |
| 71 |
|
} |
| 72 |
|
} |
| 73 |
|
|
src/Core/Shaders/Standard.php 1 location
|
@@ 83-90 (lines=8) @@
|
| 80 |
|
*/ |
| 81 |
|
public $src = null; |
| 82 |
|
|
| 83 |
|
public function removeDefaultDOMAttributes() |
| 84 |
|
{ |
| 85 |
|
$defaults = get_class_vars(get_class($this)); |
| 86 |
|
foreach (get_object_vars($this) as $name => $value) { |
| 87 |
|
if (empty($value) || (array_key_exists($name, $defaults) && $value === $defaults[$name])) |
| 88 |
|
unset($this->$name); |
| 89 |
|
} |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
public function color(string $color = '#fff') |
| 93 |
|
{ |