You are here

public function SassNode::__set in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/tree/SassNode.php \SassNode::__set()

* Setter. *

Parameters

string name of property to set: * @return mixed value of property * @return SassNode this node

File

phamlp/sass/tree/SassNode.php, line 83

Class

SassNode
SassNode class. Base class for all Sass nodes. @package PHamlP @subpackage Sass.tree

Code

public function __set($name, $value) {
  $setter = 'set' . ucfirst($name);
  if (method_exists($this, $setter)) {
    $this
      ->{$setter}($value);
    return $this;
  }
  throw new SassNodeException('No setter function for {what}', array(
    '{what}' => $name,
  ), $this);
}