Scurvy.php
private function set($var, $val) {
		$this->vars[$var] = $val;
		
		// We also need to set $var on each sub-template. So recursively do that
		foreach($this->forTemplates as $templateBunch)
			foreach($templateBunch as $sub)
				$sub->set($var, $val);

		foreach($this->ifTemplates as $templateBunch)
			foreach($templateBunch as $sub)
				$sub->set($var, $val);
		
		foreach($this->incTemplates as $sub)
			$sub->set($var, $val);
	}
private function set($var, $val) {
		$this->vars[$var] = $val;
		
		// We also need to set $var on each sub-template. So recursively do that
		foreach($this->forTemplates as $templateBunch)
			foreach($templateBunch as $sub)
				$sub->set($var, $val);

		foreach($this->ifTemplates as $templateBunch)
			foreach($templateBunch as $sub)
				$sub->set($var, $val);
		
		foreach($this->incTemplates as $sub)
			$sub->set($var, $val);
	}
private function set ( $ var , $ val ) { $ this -> vars [ $ var ] = $ val ; // We also need to set $var on each sub-template. So recursively do that foreach ( $ this -> forTemplates as $ templateBunch ) foreach ( $ templateBunch as $ sub ) $ sub -> set ( $ var , $ val ) ; foreach ( $ this -> ifTemplates as $ templateBunch ) foreach ( $ templateBunch as $ sub ) $ sub -> set ( $ var , $ val ) ; foreach ( $ this -> incTemplates as $ sub ) $ sub -> set ( $ var , $ val ) ; }
Sets the value of a variable.

@param string $var variable to set
@param mixed $val value to set var to
Sets the value of a variable .