public function setName($name)
{
if (strpos($name, ' ') !== false) {
throw new \InvalidArgumentException("Variable names cannot contain spaces");
} else {
if (strpos($name, '$') !== false) {
throw new \InvalidArgumentException("Variable names cannot contain a '\$' character");
}
}
$this->name = $name;
return $this;
}