19 declare(strict_types=1);
57 string $category_name,
58 array $references = []
72 public function setName(
string $name): void
84 if ($this->
getName() ==
'il-icon-font-path') {
85 if ($value[0] !=
"\"") {
88 if (substr($value, -1, 1) !=
"\"") {
92 if ($value ==
"\"../../node_modules/bootstrap/fonts/\"") {
93 $value =
"\"../../../../node_modules/bootstrap/fonts/\"";
97 $value = str_replace(PHP_EOL,
'', $value);
98 $this->value = str_replace(
"\n",
'', $value);
108 $comment = str_replace(PHP_EOL,
'', $comment);
109 $this->
comment = str_replace(
"\n",
'', $comment);
140 $content .=
'//** ' . $this->
getComment() .
"\n";
142 $content .=
'@' . $this->
getName() .
":\t\t" . $this->
getValue() .
";\n";
setComment(string $comment)
array $references
Set references to other variables that are used by this exact variable.
string $comment
Comment to the variable as in the less file.
__construct(string $name, string $value, string $comment, string $category_name, array $references=[])
string $name
Name of the variable.
setCategoryName(string $category_name)
string $category_name
Less Category which encloses this variable.
string $value
Value of the variable as set in the less file.
__toString()
This function will be needed to write the variable back to the less file and restore it's initial str...
setReferences(array $references)
Abstracts content of a less file.