public function addVariable(Variable $variable) { $this->variables[$variable->getHash()] = $variable; return $this; }