Get var send to View from Controller or Layout

@since   1.0
@param   string $varName Name of var send to View
@return  string|bool Value of var send to View if exist else false
335791
public function getVar($varName)
    {
        if (!isset($this->variableList[$varName])) {
            trigger_error('Variable "' . $varName . '" isn\'t defined in View.', E_USER_WARNING);
            return false;
        }
        return $this->variableList[$varName];
    }
116257
public function getViewParam($sName)
    {
        $sValue = null;
        if (isset($this->_aViewParams[$sName])) {
            $sValue = $this->_aViewParams[$sName];
        }

        return $sValue;
    }
531465
public function get($varname, $default = false)
	{
		if(isset($this->getvars[$varname])) {
			return $this->getvars[$varname];
		} else {
			return $default;
		}
	}
45381
function variable( $blockName, $varName )
    {
        if ( isset( $this->BlockValues[$blockName][$varName] ) )
        {
            $value = $this->BlockValues[$blockName][$varName];
        }

        if ( isset( self::$injectedSettings[$this->FileName][$blockName][$varName] ) )
        {
            $value = self::$injectedSettings[$this->FileName][$blockName][$varName];
        }

        if ( isset( $value ) && isset( self::$injectedMergeSettings[$this->FileName][$blockName][$varName] ) )
        {
            if ( !is_array( $value ) || !is_array( self::$injectedMergeSettings[$this->FileName][$blockName][$varName] ) )
            {
                throw new RuntimeException( "injected-merge-settings can only reference and contain array values" );
            }
            $value = array_merge( $value, self::$injectedMergeSettings[$this->FileName][$blockName][$varName] );
        }

        if ( isset( $value ) )
            return $value;

        if ( !isset( $this->BlockValues[$blockName] ) )
            eZDebug::writeError( "Undefined group: '$blockName' in " . $this->FileName, __METHOD__ );
        else
            eZDebug::writeError( "Undefined variable: '$varName' in group '$blockName' in " . $this->FileName, __METHOD__ );
        return false;
    }
661262
@SuppressWarnings("unchecked")
    public <T> T getValue(final String variableName) {
        final Variable variable = getVariable(variableName);
        return (variable == null) ? null : (T) variable.getValue();
    }
175535
public function getParam($var = null)
    {
        $param = $this->_parameters;
        if (null !== $var) {
            if (isset($this->_parameters[$var])) {
                $param = $this->_parameters[$var];
            } else {
                $param = null;
            }
        }

        return $param;
    }
1184408
@Override
    @SuppressWarnings("unchecked")
    public <T> Variable<T> getVariable(final String variableName) {
        final String[] subTokens = getSubVariableTokens(variableName);
        if (subTokens != null) {
            final Variable<T> sub = getSubVariable(subTokens[0], subTokens[1]);
            if (sub != null) {
                return sub;
            }
        }
        final Variable<T> v;
        synchronized (variables) {
            v = variables.get(variableName);
        }
        return v;
    }
734842
public function getView($name)
    {
        if (!isset(self::$_controllers['view.'.$name])) {
            $view = $this->getController($name)->setView($name)->getView();
            self::$_controllers['view.'.$name] = $view;
        }

        return self::$_controllers['view.'.$name];
    }
602545
public static function getGetPostSession($variableName)
    {

        $value = null;

        if (isset($_SESSION[$variableName])) {
            $value = $_SESSION[$variableName];
        }

        $postGetValue = self::getGetPost($variableName);

        if ($postGetValue !== null) {
            $value                   = $postGetValue;
            $_SESSION[$variableName] = $value;
        }

        return $value;
    }
882317
public function getVar($key)
    {
        return (array_key_exists($key, $this->vars)) ? $this->vars[$key] : null;
    }
1257837
public function get(string $var){
		$var = strtoupper($var);
		$env = null;

		if($this->global === true){

			if(array_key_exists($var, $_ENV)){
				$env = $_ENV[$var];
			}
			elseif(function_exists('getenv')){
				$env = getenv($var);
			}
			// @codeCoverageIgnoreStart
			elseif(function_exists('apache_getenv')){
				/** @noinspection PhpComposerExtensionStubsInspection */
				$env = apache_getenv($var);
			}
			// @codeCoverageIgnoreEnd

		}

		return $env ?? $this->_ENV[$var] ?? null;
	}
836452
public function getVariable($key)
    {
        if (!isset($this->variables[$key])) {
            return null;
        }
        return $this->variables[$key];
    }
818747
public function getVar($name = null)
    {
        $context = $this->_context;

        if ($name === null) {
            return $context->vars;
        } else {
            return isset($context->vars[$name]) ? $context->vars[$name] : null;
        }
    }
515956
public static function var_dump($var, $varname = '...', $params = array())
    {
        if (!self::isDebug()) {
            return false;
        }

        // var_dump the variable into a buffer and keep the output
        ob_start();
        var_dump($var);
        $output = ob_get_clean();
        $_this  = self::i();

        // neaten the newlines and indents
        $output = preg_replace("/\]\=\>\n(\s+)/m", "] => ", $output);
        //if (!extension_loaded('xdebug')) {
        $output = $_this->_htmlChars($output);
        //}

        $_this->_dumpRenderHtml($output, $varname . '::html', $params);

        return $_this;
    }
328810
public function setvarval($varname, $value, $required = false) {
		if (!isset($this->fields[$varname])) {
			return false;
		}
		$type = $this->fields[$varname]->type;

		switch ($type) {
			case 'int':
			case 'integer':
				if ((empty($value)) && ($required)) {
					return false;
				}
				$this->{$varname} = (int)$value;
				return true;
			case 'float':
				if ((empty($value)) && ($required)) {
					return false;
				}
				$this->{$varname} = (float)$value;
				return true;
			case 'itm':
			case 'item':
				if ((empty($value)) && ($required)) {
					return false;
				}
				$this->{$varname} = (int)$value;
				return true;
			case 'bool':
			case 'boolean':
				$this->{$varname} = (bool)$value;
				return true;
			case 'str':
			case 'string':
				$value2 = $value;
				//If the fiels is alias, that
				if ((empty($value2)) && (!empty($this->fields[$varname]->alias))) {
					$str = '';
					foreach ($this->fields[$varname]->alias as $aliasfld) {
						$str .= (empty($str) ? '' : '-') . $this->{$aliasfld};
					}
					$value2 = \Brilliant\CMS\BLang::generatealias($str);
				}
				if ((empty($value2)) && ($required)) {
					return false;
				}
				$this->{$varname} = $value2;
				return true;
			case 'binary':
				$this->{$varname} = $value;
				return true;
			case 'enum':
				//Check enum
				$this->{$varname} = $value;
				return true;
			case 'dt':
				$obj = NULL;
				if ((empty($value)) && ($required)) {
					return false;
				}
				if (!empty($value)) {
					$obj = new \Brilliant\BDateTime($value);
				}
				$this->{$varname} = $obj;
				return true;
			case 'image':
				bimport('images.single');
				if ((empty($value)) && ($required)) {
					return false;
				}
				$img = new BImage();
				$img->url = $value;
				$this->{$varname} = $img;
				return true;
			case 'json':
				if ((empty($value)) && ($required)) {
					return false;
				}
				$this->{$varname} = $value;
				return true;
		}
		return false;
	}
52768
public function getVariable($name)
    {
        $result = null;
        $this->addHeader();
        try {
            $result = $this->getSoap()->GetVariable([
                'name' => $name
            ]);
        } catch (\SoapFault $ex) {
            $this->logError();
        }
        return $result;
    }
1337248
function &variable( $key )
    {
        if ( isset( $this->VariableList[$key] ) )
            $retValue = $this->VariableList[$key];
        else
            $retValue = false;
        return $retValue;
    }