Get global variables

@return array
16201
public static function get() : array
  {
    return [
      'csrf_token' => CSRF::generate(),
      'errors' => Variable::has('validation.errors') ? Variable::get('validation.errors') : (new ValidatorFactory())->make([], [])->errors(),
      'old' => Variable::has('form.old') ? Variable::get('form.old') : [],
    ];
  }
257984
public function getTemplateVariables()
	{
		return array_merge($this->template_variables, [
			'options' => $this->getOptions(),
			'column' => $this->getColumn(),
			'key' => $this->getKey(),
			'status' => $this,
		]);
	}
442239
public function getVariables() 
	{
		if(isset($this->attributes['class'])) {
			$this->attributes['class'] = trim($this
			->attributes['class'].' eden-field-wysiwyg form-control');
		} else {
			$this->attributes['class'] = 'eden-field-wysiwyg form-control';
		}
		
		$loaded = self::$loaded;
		self::$loaded = true;
		
		return array(
			'loaded'		=> $loaded,
			'options'		=> $this->options,
			'attributes' 	=> $this->attributes,
			'value'			=> $this->value);
	}
1164825
public function getGlobalAdministrators()
    {
        if ($this->globalAdministrators === null) {
            $this->globalAdministrators = $this->getGroup(self::GROUPNAME_GLOBAL_ADMINISTRATORS);
        }

        return $this->globalAdministrators;
    }
669552
protected function getVariables()
    {
        $reflection = new ReflectionClass($this);
        foreach ($reflection->getProperties(
            ReflectionProperty::IS_PROTECTED |
            ReflectionProperty::IS_PRIVATE |
            ReflectionProperty::IS_STATIC
        ) as $property) {
            $ignore[] = $property->name;
        }
        $values = [];
        foreach ($this as $prop => $value) {
            if (!in_array($prop, $ignore)) {
                if (is_object($value)) {
                    if (method_exists($value, 'jsonSerialize')) {
                        $value = $value->jsonSerialize();
                    } elseif (method_exists($value, 'getArrayCopy')) {
                        $value = $value->getArrayCopy();
                    }
                }
                $values[$prop] = $value;
            }
        }
        return $values;
    }
986475
protected function get_less_variables() {
        $variables = array();

        // Getting all the candidate functions.
        $candidates = array();
        foreach ($this->parent_configs as $parent_config) {
            if (!isset($parent_config->lessvariablescallback)) {
                continue;
            }
            $candidates[] = $parent_config->lessvariablescallback;
        }
        $candidates[] = $this->lessvariablescallback;

        // Calling the functions.
        foreach ($candidates as $function) {
            if (function_exists($function)) {
                $vars = $function($this);
                if (!is_array($vars)) {
                    debugging('Callback ' . $function . ' did not return an array() as expected', DEBUG_DEVELOPER);
                    continue;
                }
                $variables = array_merge($variables, $vars);
            }
        }

        return $variables;
    }
1088101
public function getVariables() 
	{
		return array(
			'use_wysiwyg' => $this->wysiwyg,
			'fields' => $this->show,
			'labels' => $this->labels,
			'data' => $this->data,
			'errors' => $this->errors,
			'holders' => $this->holders);
	}
79093
public function getVariableRefs()
	{
		$variableRefs = array();

		if ( $this->attributes )
		{
			if ( isset( $this->attributes['qnameXPath2Expressions'] ) && $this->attributes['qnameXPath2Expressions'] )
			foreach ( $this->attributes['qnameXPath2Expressions'] as $qnameXPath2Expression )
			{
				$variableRefs = array_merge( $variableRefs, $qnameXPath2Expression->getParameterQNames() );
			}
		}

		return $variableRefs;
	}
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;
	}
510097
protected function getGlobalThrottles()
    {
        if ($this->globalThrottles === null) {
            $this->globalThrottles = $this->loadGlobalThrottles();
        }

        return $this->globalThrottles;
    }
63791
public function getVariables() 
	{
		if(count($this->items) > 1) {
			$this->attributes['name'] .= '[]';
		}
		
		$this->attributes['type'] = 'checkbox';
		
		return array(
			'attributes' 	=> $this->attributes,
			'items'			=> $this->items,
			'selected'		=> $this->value);
	}
591521
public function scriptVariables()
    {
        $data = json_encode([
            'locale' => $this->get('locale'),
            'app_name' => $this->get('app_name'),
            'app_skin' => $this->get('app_skin'),
            'app_theme' => $this->get('app_theme'),
            'app_url' => $this->get('app_url'),
        ]);

        if (JSON_ERROR_NONE !== json_last_error()) {
            throw new \RuntimeException(json_last_error_msg());
        }

        return $data;
    }
899827
public function getSettingsSetGlobally()
	{
		$ret = array();
		foreach( $this->getSettings() as $name => $value )
		{
			if( $this->isColumnSetLocally($name) )
			{
				$ret[$name] = $value;
			}
		}
		foreach( $this->_settingsJoined as $alias => $value )
		{
			if( debug_assert(!array_key_exists($alias,$ret),'Joined setting with the same alias defined as local one.') )
			{
				$ret[$alias] = $value;
			}
		}
		return $ret;
	}
619861
protected function getVariables()
    {
        foreach ($this->fields as $field) {
            $field->fill($this->data);
        }

        return [
            'fields' => $this->fields,
            'attributes' => $this->formatAttribute(),
            'method' => $this->attributes['method'],
        ];
    }
1311647
protected function _globalScopes()
    {
        if ($this->companyAttribute) {
            
            $this->getBuilder()->where(
                $this->_field($this->companyAttribute), 
                $this->user->getCompanyID();
                );
        }
        
        if ($this->userAttribute) {
            
            $this->getBuilder()->where(
                $this->_field($this->userAttribute), 
                $this->user->getID();
                );
        }
        return parent::_globalScopes();
    }
1251309
private function set_global_variable()
    {
        $var_name = "";
        
        if( null != $this->config->global_variable )
        {
            $var_name = $this->config->global_variable;
        }
        else
        {
            $var_name = $this->page->get_slug().'_options';
        }
        
        $GLOBALS[$var_name] = $this->options->get();
    }
292766
public static function getVars()
    {
        if (!is_array(static::$vars)) {
            $path = static::path("data/env.json");

            try {
                $vars = Json::decodeFromFile($path);
            } catch(\Exception $e) {
                $vars = [];
            }

            static::$vars = Helper::toArray($vars);
        }

        return static::$vars;
    }