public static function SassScriptFunctions::quote in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/SassScriptFunctions.php \SassScriptFunctions::quote()
Add quotes to a string if the string isn't quoted, or returns the same string if it is.
Parameters
string String to quote:
Return value
new SassString Quoted string
Throws
SassScriptFunctionException If $string is not a string
See also
unquote
File
- phpsass/
script/ SassScriptFunctions.php, line 703
Class
- SassScriptFunctions
- SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script
Code
public static function quote($string) {
SassLiteral::assertType($string, 'SassString');
return new SassString('"' . $string->value . '"');
}