You are here

public function SassParser::__get in Sassy 7.3

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

Getter.

Parameters

string name of property to get:

Return value

mixed return value of getter function

File

phpsass/SassParser.php, line 367

Class

SassParser
SassParser class. Parses {@link http://sass-lang.com/ .sass and .sccs} files. @package PHamlP @subpackage Sass

Code

public function __get($name) {
  $getter = 'get' . ucfirst($name);
  if (method_exists($this, $getter)) {
    return $this
      ->{$getter}();
  }
  if (property_exists($this, $name)) {
    return $this->{$name};
  }
  if ($this->debug) {
    throw new SassException('No getter function for ' . $name);
  }
}