PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 All 82 releases
yatra / vendor / sabberworm / php-css-parser / src / Comment / Comment.php

Comment.php in Yatra – Travel Booking & Tour Operator Software trunk, 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