ILIAS  release_8 Revision v8.24
class.ilSystemStyleLessComment.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
30{
34 protected string $comment = '';
35
39 public function __construct(string $comment)
40 {
41 $this->setComment($comment);
42 }
43
44 public function getComment(): string
45 {
46 return $this->comment;
47 }
48
49 public function setComment(string $comment): void
50 {
51 $comment = str_replace(PHP_EOL, '', $comment);
52 $this->comment = str_replace("\n", '', $comment);
53 }
54
59 public function __toString(): string
60 {
61 return $this->getComment() . "\n";
62 }
63}
Capsules all data which is neither part of a variable or category structure in the less file.
string $comment
Random content of the less file being neither part of a variable or category.
__construct(string $comment)
ilSystemStyleLessComment constructor.
__toString()
This function will be needed to write the comment back to the less file and restore it's initial stru...
Abstracts content of a less file.