public function registerVariable($name, $value)
    {
        if (is_object($value)) {
            throw new \InvalidArgumentException('registerVariable(): Cannot pass objects, can only register primitive types; use registerInstance() instead');
        }

        $this->variablesByName[$name] = $value;
    }