PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.3
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.3
2.4.3 2.4.4 2.4.2 2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 All 60 releases
easy-invoice / vendor / sabberworm / php-css-parser / src / Comment / Comment.php

Comment.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.4.3, at vendor/sabberworm/php-css-parser/src/Comment/Comment.php

69 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sabberworm\CSS\Comment;
4
5 use Sabberworm\CSS\OutputFormat;
6 use Sabberworm\CSS\Renderable;
7 use Sabberworm\CSS\Position\Position;
8 use Sabberworm\CSS\Position\Positionable;
9
10 class Comment implements Positionable, Renderable
11 {
12 use Position;
13
14 /**
15 * @var string
16 *
17 * @internal since 8.8.0
18 */
19 protected $sComment;
20
21 /**
22 * @param string $sComment
23 * @param int $iLineNo
24 */
25 public function __construct($sComment = '', $iLineNo = 0)
26 {
27 $this->sComment = $sComment;
28 $this->setPosition($iLineNo);
29 }
30
31 /**
32 * @return string
33 */
34 public function getComment()
35 {
36 return $this->sComment;
37 }
38
39 /**
40 * @param string $sComment
41 *
42 * @return void
43 */
44 public function setComment($sComment)
45 {
46 $this->sComment = $sComment;
47 }
48
49 /**
50 * @return string
51 *
52 * @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
53 */
54 public function __toString()
55 {
56 return $this->render(new OutputFormat());
57 }
58
59 /**
60 * @param OutputFormat|null $oOutputFormat
61 *
62 * @return string
63 */
64 public function render($oOutputFormat)
65 {
66 return '/*' . $this->sComment . '*/';
67 }
68 }
69