public function addScriptConstant($name, $value = null)
    {
        if ($name instanceof ScriptConstant) {
            $scriptConstant = $name;
        } else {
            $scriptConstant = new ScriptConstant($name, $value);
        }
        if (!in_array($scriptConstant, $this->constants)) {
            array_push($this->constants, $scriptConstant);
        }
        return $this;
    }