-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathComment.php
More file actions
60 lines (55 loc) · 1.51 KB
/
Comment.php
File metadata and controls
60 lines (55 loc) · 1.51 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
namespace PostCSS;
/**
* Represents a comment between declarations or statements (rule and at-rules).
*
* Comments inside selectors, at-rule parameters, or declaration values will be stored in the `raws` properties explained above.
*
* @link https://github.com/postcss/postcss/blob/master/lib/comment.es6
*/
class Comment extends Node
{
/**
* The comment's text.
*
* @var string|null
*/
public $text = null;
public function __construct(array $defaults = [])
{
parent::__construct($defaults);
$this->type = 'comment';
}
/**
* @deprecated Comment->left was deprecated. Use Comment->raws->left
* @deprecated Comment->right was deprecated. Use Comment->raws->right
*/
public function __get($name)
{
switch ($name) {
case 'left':
return $this->raws->left;
case 'right':
return $this->raws->right;
default:
return parent::__get($name);
}
}
/**
* @deprecated Comment->left was deprecated. Use Comment->raws->left
* @deprecated Comment->right was deprecated. Use Comment->raws->right
*/
public function __set($name, $value)
{
switch ($name) {
case 'left':
$this->raws->left = $value;
break;
case 'right':
$this->raws->right = $value;
break;
default:
return parent::__set($name);
}
}
}