You are here

public function SassString::__construct in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/script/literals/SassString.php \SassString::__construct()

* class constructor *

Parameters

string string: * @return SassString

Overrides SassLiteral::__construct

File

phamlp/sass/script/literals/SassString.php, line 36

Class

SassString
SassString class. Provides operations and type testing for Sass strings. @package PHamlP @subpackage Sass.script.literals

Code

public function __construct($value) {
  preg_match(self::_MATCH, $value, $matches);
  if (isset($matches[self::QUOTE])) {
    $this->quote = $matches[self::QUOTE];
    $this->value = $matches[self::VALUE];
  }
  else {
    $this->quote = '';
    $this->value = $value;
  }
}