summaryrefslogtreecommitdiffstats
path: root/library/Icinga/File/Ini/Dom/Comment.php
blob: c202d0fd15b3c36586d96dd5420db0b3ebc91f92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */

namespace Icinga\File\Ini\Dom;

/**
 * A single comment-line in an INI file
 */
class Comment
{
    /**
     * The comment text
     *
     * @var string
     */
    protected $content;

    /**
     * Set the text content of this comment
     *
     * @param $content
     */
    public function setContent($content)
    {
        $this->content = $content;
    }

    /**
     * Render this comment into INI markup
     *
     * @return string
     */
    public function render()
    {
        return ';' . $this->content;
    }
}