Skip to content

Commit acdfc7d

Browse files
committed
added @namespace rule support
1 parent 30b76fe commit acdfc7d

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Sabberworm\CSS\Property;
4+
5+
/**
6+
* Class representing an @namespace rule.
7+
*/
8+
class CssNamespace {
9+
private $sValue;
10+
private $sPrefix;
11+
12+
public function __construct($sValue, $sPrefix = null) {
13+
$this->sValue = $sValue;
14+
$this->sPrefix = $sPrefix;
15+
}
16+
17+
public function __toString() {
18+
return '@namespace '.$this->sPrefix.' "'.$this->sValue.'";';
19+
}
20+
21+
public function getValue() {
22+
return $this->sValue;
23+
}
24+
25+
public function getPrefix() {
26+
return $this->sPrefix;
27+
}
28+
29+
public function setValue($sValue) {
30+
$this->sValue = $sValue;
31+
}
32+
33+
public function setPrefix($sPrefix) {
34+
$this->sPrefix = $sPrefix;
35+
}
36+
37+
}

0 commit comments

Comments
 (0)