You are here

public function SassLiteral::__get in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/literals/SassLiteral.php \SassLiteral::__get()

Getter.

Parameters

string name of property to get:

Return value

mixed return value of getter function

File

phpsass/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 ' . $name, SassScriptParser::$context->node);
  }
}