composer package updates
[openemr.git] / vendor / sabberworm / php-css-parser / lib / Sabberworm / CSS / Value / CSSString.php
blobb07000818e261a0ae023c9d71ec1b6e236f20eb5
1 <?php
3 namespace Sabberworm\CSS\Value;
5 class CSSString extends PrimitiveValue {
7 private $sString;
9 public function __construct($sString, $iLineNo = 0) {
10 $this->sString = $sString;
11 parent::__construct($iLineNo);
14 public function setString($sString) {
15 $this->sString = $sString;
18 public function getString() {
19 return $this->sString;
22 public function __toString() {
23 return $this->render(new \Sabberworm\CSS\OutputFormat());
26 public function render(\Sabberworm\CSS\OutputFormat $oOutputFormat) {
27 $sString = addslashes($this->sString);
28 $sString = str_replace("\n", '\A', $sString);
29 return $oOutputFormat->getStringQuotingType() . $sString . $oOutputFormat->getStringQuotingType();