function TemplateElement::setRawValue
Sets node's raw value that must be wrapped in templates quotes.
Parameters
string $rawValue Raw value:
Return value
$this
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Node/ TemplateElement.php, line 120
Class
- TemplateElement
- A node that represents a template element. For example `foo` and `bar` in: `foo${exp}bar`
Namespace
Peast\Syntax\NodeCode
public function setRawValue($rawValue) {
$rawValue = preg_replace("#^[`}]|(?:`|\\\$\\{)\$#", "", $rawValue);
$this->setValue(Utils::unquoteLiteralString("`{$rawValue}`"));
$this->rawValue = $rawValue;
return $this;
}