public function SassLiteral::__get in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/script/literals/SassLiteral.php \SassLiteral::__get()
* Getter. *
Parameters
string name of property to get: * @return mixed return value of getter function
File
- phamlp/
sass/ script/ literals/ SassLiteral.php, line 53
Class
- SassLiteral
- SassLiteral class. Base class for all Sass literals. Sass data types are extended from this class and these override the operation methods to provide the appropriate semantics. @package PHamlP @subpackage Sass.script.literals
Code
public function __get($name) {
$getter = 'get' . ucfirst($name);
if (method_exists($this, $getter)) {
return $this
->{$getter}();
}
else {
throw new SassLiteralException('No getter function for {what}', array(
'{what}' => $name,
), array(), SassScriptParser::$context->node);
}
}