ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSystemStyleLessComment.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 }
__toString()
This function will be needed to write the comment back to the less file and restore it&#39;s initial stru...
string $comment
Random content of the less file being neither part of a variable or category.
Abstracts content of a less file.
Capsules all data which is neither part of a variable or category structure in the less file...
__construct(string $comment)
ilSystemStyleLessComment constructor.