Getter for returning variables by key
@param mixed $variable
@return mixed
960032
public function getVariable($variable) {
		
		if(true === isset($this -> variables[$variable])) {
			return $this -> variables[$variable];
		}
	}
821646
public function get($key)
    {
        return isset($this->vars[$key]) ? $this->vars[$key] : false;
    }
467321
public function &__get($key)
    {
        if (!isset($this->$key)) {
            $this->$key = null;
        }

        return $this->$key;
    }
98841
public function getVariable($key)
    {
        $key = (string) $key;
        return $this->hasVariable($key) ? $this->currentRequest->variables->$key : null;
    }
447982
public function vars($key = null)
    {
        if (null === $this->__vars) {
            $this->setVars(new Variables());
        }

        if (null === $key) {
            return $this->__vars;
        }
        return $this->__vars[$key];
    }
409248
public function &__get($key)
    {
        if (array_key_exists($key, $this->_data)) {
            return $this->_data[$key];
        }
        if (array_key_exists($key, $this->_given)) {
            $scope = Suite::current()->scope();
            $scope->{$key} = $this->_given[$key]($scope);
            return $scope->__get($key);
        }
        if ($this->_parent !== null) {
            return $this->_parent->__get($key);
        }
        throw new Exception("Undefined variable `{$key}`.");
    }
358653
public function getter($key)
    {
        $property = $this;

        return function($object) use ($key, $property) {
            $value = $object->get($key);

            if (is_null($value) && $property->type->options()->primary) {
                return $property->reference($object);
            } else {
                return $value;
            }
        };
    }
126588
public static function getVariable(string $name): stdClass
    {
        self::loadData();
        if (isset(Search::$data->vars->{$name})) {
            return Search::$data->vars->{$name};
        } else {
            throw new KBException("$name does not exist !");
        }
    }
436925
public static function get($key) {
        if (isset(self::$keyvals) && isset(self::$keyvals[$key])) {
            return self::$keyvals[$key];
        }
        return '';
    }
897158
public function loadByKey($key)
    {
        $configuration = new Configuration();
        require $key;
        $vars = get_defined_vars();
        unset($vars['configuration']);
        unset($vars['key']);
        foreach ($vars as $name => $value) {
            $configuration->{$name} = $value;
        }

        return $configuration;
    }
1079198
public function get(string $var)
    {
        if (!$this->mainNode) {
            return null;
        }

        $node = $this->mainNode->getLastByKey($var);
        if ($node === null) {
            return null;
        }

        return $node->getData();
    }
974964
public function getMagicVariableValue($variable)
    {
        $base_path_name = basename(realpath("."));

        switch ($variable) {
            case self::MAGIC_VAR_BASENAME:
                return $base_path_name;
                break;

            case self::MAGIC_VAR_UCFIRST_BASENAME:
                return ucfirst($base_path_name);
                break;

            case self::MAGIC_VAR_UPPER_CAMEL_CASE_BASENAME:
                return $this->toUpperCamelCase($base_path_name);
                break;

            case self::MAGIC_VAR_LOWER_CAMEL_CASE_BASENAME:
                return $this->toLowerCamelCase($base_path_name);
                break;
        }

        return null;
    }
451028
public function return(string ...$variables): self
    {
        $query = new self;
        $query->clauses = $this->clauses->add(
            new Clause\ReturnClause(...$variables)
        );

        return $query;
    }
83047
public function getVariable(string $variable, $default = null)
    {
        if (isset($this->variables[$variable])) {
            return $this->variables[$variable];
        }

        return $default;
    }
566324
public function getFieldVariables($key)
    {
        $variables = array();

        foreach ($this->getFieldValues($key) as $value) {
            $temp = explode('=', $value, 2);
            $variables[$temp[0]] = $temp[1];
        }

        return $variables;
    }
1141895
public function getVariable($name) {
		if (isset($this->variables[$name])) {
			return $this->variables[$name];
		} else {
			return null;
		}
	}
1317649
public static function getVariables()
    {
        // Suppress return by-ref
        $vars = [ 'env' => static::$env ];
        // needs to use a for loop, using `array_merge([], $GLOBALS);` left reference traces somehow
        foreach ($GLOBALS as $varName => $varValue) {
            $vars[$varName] = $varValue;
        }

        return $vars;
    }