Get defined global variables.

@return array
344749
protected function getGlobals()
    {
        global $GLOBALS;

        $names = \array_keys($GLOBALS);
        \natcasesort($names);

        $ret = [];
        foreach ($names as $name) {
            $ret[$name] = $GLOBALS[$name];
        }

        return $ret;
    }
35992
public function getVariableRefs()
	{
		$result = $this->dateXPath2expression instanceof XPath2Expression
			? $this->dateXPath2expression->getParameterQNames()
			: array();

		if ( $this->timeXPath2expression && $this->timeXPath2expression instanceof XPath2Expression )
		{
			$result = array_merge( $result, $this->timeXPath2expression->getParameterQNames() );
		}

		return $result;
	}
775225
public function getVars()
    {
        $vars = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);

        $vars->env = $_ENV;
        $vars->server = $_SERVER;
        $vars->session = $_SESSION;
        $vars->cookies = $_COOKIE;
        $vars->get = $_GET;
        $vars->post = $_POST;
        $vars->files = $_FILES;

        if (function_exists('apache_request_headers')) {
            $vars->headers = apache_request_headers();
        } elseif (function_exists('getallheaders')) {
            $vars->headers = getallheaders();
        } else {
            $vars->headers = [];
            foreach ($_SERVER as $name => $value) {
                if (substr($name, 0, 5) == 'HTTP_') {
                    $vars->headers[ str_replace(' ', '-',
                        ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))) ] = $value;
                }
            }
        }

        return $vars;
    }
452995
protected function getDefaultContextVariables()
    {
        if ($this->defaultContextVariables === null) {
            $this->defaultContextVariables = [];
            if (isset($this->settings['defaultContext']) && is_array($this->settings['defaultContext'])) {
                $this->defaultContextVariables = EelUtility::getDefaultContextVariables($this->settings['defaultContext']);
            }
            $this->defaultContextVariables['request'] = $this->controllerContext->getRequest();
        }
        return $this->defaultContextVariables;
    }
875914
public function getVariables()
    {
        $variables = array_merge(
            $this->getCategoryVariables(),
            $this->getProductVariables(),
            $this->getProductListVariables(),
            $this->getLayerVariables()
        );

        return $variables;
    }
851895
public function getVariables()
    {
        $variableStats = [];

        foreach ($this->variablesToSkip as $branchNumber => $variables) {
            foreach ($variables as $variable => $one) {
                if (!isset($variableStats[$variable])) {
                    $variableStats[$variable] = 1;
                } else {
                    ++$variableStats[$variable];
                }
            }
        }

        $variables = [];
        $numberBranches = \count($this->branches);
        foreach ($variableStats as $variable => $number) {
            if ($number == $numberBranches) {
                $variables[] = $variable;
            }
        }

        return $variables;
    }
1103555
private function getBBVariable()
    {
        return [
            'bb' => [
                'debug'      => $this->getApplication()->isDebugMode(),
                'token'      => $this->getApplication()->getBBUserToken(),
                'request'    => $this->getApplication()->getRequest(),
                'routing'    => $this->getApplication()->getRouting(),
                'translator' => $this->getApplication()->getContainer()->get('translator'),
            ],
        ];
    }
166682
function &globals()
    {
        $globals = array();
        $packages = $this->packages(); // not by reference so as not to move the internal array pointer
        foreach ($packages as $name => $package) {
            $packageGlobals = $this->_packages[$name]->globals(); // not by reference so as not to move the internal array pointer
            if ($packageGlobals) {
                foreach ($packageGlobals as $key => $pack) {
                    $globals[$name.'.'.$key] =& $packageGlobals[$key];
                }
            }
        }
        ksort($globals);

        return $globals;
    }
544129
protected function getGlobalOptionNames(): array
	{
		$names = [];

		foreach($this->options as $group)
		{
			$names = array_merge($names, array_keys($group));
		}

		return $names;
	}
477736
public function getVariables()
    {
        $variables = [];

        if ($this->page->getId()) {
            $variables['cms.identifier'] = $this->page->getIdentifier();
            $variables['cms.title']      = $this->page->getTitle();
        }

        return $variables;
    }
285897
private function LoadGlobalVariablesFromJson()
    {
        $variables_def = Json::Decode(file_get_contents(
            $this->definitions_path . "variables.json")
        );

        foreach($variables_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $variables)
            {
                foreach($variables as $variable_name => $variable_data)
                {
                    if(!isset($variable_data["description"]))
                        $variable_data["description"] = "";
                    
                    $variable = new Element\GlobalVariable(
                        $variable_name,
                        $variable_data["type"],
                        $variable_data["description"]
                    );

                    $this->symbols->headers[$header]->AddGlobalVariable(
                        $variable,
                        $namespace
                    );
                }
            }
        }

        unset($variables_def);
    }
1346100
public function getVariableRefs()
	{
		$variableRefs = array();

		if ( $this->qnameXPath2Expression )
		{
			$variableRefs = array_merge( $variableRefs, $this->qnameXPath2Expression->getParameterQNames() );
		}

		return $variableRefs;
	}
213030
public function getVariables()
    {
        if (!$this->variables->count()) {
            return array();
        }

        // If credentials are not globally defined,
        // check if an action have credentials
        if (null === $this->getVariable('credentials')) {
            $this->variables->set('credentials', false);
            foreach (array_merge(array_values($this->getObjectActions()), array_values($this->getBatchActions())) as $action) {
                if ($action->getCredentials()) {
                    $this->variables->set('credentials', true);
                    break;
                }
            }
        }

        return parent::getVariables();
    }
33722
public function getParameters() {
		$filledvars = array();
		foreach (get_object_vars($this) as $name => $value) {
			if ($value) {
				$filledvars[$name] = (string)$value;
			}
		}

		return $filledvars;
	}
141652
public function getGlobals() {
		$globals = [
			'post' => get_post( get_the_ID() )
		];

		/**
		 * Modify globals or add custom.
		 *
		 * @param array $globals
		 */
		$globals = apply_filters( 'digster/globals', $globals );
		$globals = is_array( $globals ) ? $globals : [];

		return $globals;
	}
145360
private function globalVar() {
    if ($this->currentType === T_VARIABLE) {
      return $this->mustMatchToken(T_VARIABLE);
    }
    elseif ($this->currentType === '$') {
      if ($this->isLookAhead('{')) {
        return $this->_compoundVariable();
      }
      else {
        $node = new VariableVariableNode();
        $this->mustMatch('$', $node);
        $node->addChild($this->variable());
        return $node;
      }
    }
    throw new ParserException(
      $this->filename,
      $this->iterator->getLineNumber(),
      $this->iterator->getColumnNumber(),
      'expected a global variable (eg. T_VARIABLE)');
  }
1039108
public function findGlobals()
    {
        $presets = $this->loadPresets();
        $globalPresets = [];
        foreach ($presets as $key => $preset) {
            foreach ($preset['applications'] as $application) {
                if (empty($application['options']['repositoryUrl'])) {
                    $globalPresets[$key] = $preset;
                }
            }
        }
        return $globalPresets;
    }