Get the state value for a given key.

@param string $key      Key to get the state from.
@param mixed  $fallback Fallback value to use if the key is not defined.

@return mixed
540496
public function getValue( $key, $fallback = null ) {
		return array_key_exists( $key, $this->state )
			? $this->state[ $key ]
			: $fallback;
	}
764527
public function tryGet($key)
    {
        if (isset($this->overrides[$key])) {
            return $this->overrides[$key];
        }

        if (isset($this->defaults[$key])) {
            return $this->defaults[$key];
        }

        return null;
    }
995028
public function get($key, $default = null) {
		$this->check();
		$value = $this->readValue($key);
		return is_null($value) ? $default : $value;
	}
1302295
public static function get(array $array, $key, $fallback = null)
    {
        $keys = explode('.', $key);
        foreach($keys as $key) {
            if(!isset($array[$key])) {
                return $fallback;
            }
            $array = $array[$key];
        }

        return $array;
    }
252367
public function cookies($key = null, $fallback = null)
    {
        return $key
            ? $this->request->cookies->get($key, $fallback)
            : $this->request->cookies;
    }
80125
public function get($key)
    {
        $setting = $this->getSettingOrFail($key);

        $value = $this->backend->getSetting($key);

        return  is_null($value) ? $setting->default() : $value;
    }
55351
public function getMetaValue($metaName, $fallback = null)
    {
        $meta = $this->getMeta();
        return array_key_exists($metaName, $meta) ? $meta[$metaName] : $fallback;
    }
907587
public function server($key = null, $fallback = null)
    {
        return $key
            ? $this->request->server->get($key, $fallback)
            : $this->request->server;
    }
1051912
public function get($key, array $replace = [], $locale = null, $fallback = true)
    {
        if (!$line = Line::findByKey($key)) {

            /**
             * If no line is requested,
             * we check if an entire page is asked for
             */
            if($page = Page::findByKey($key))
            {
                $lines = Line::getValuesByLocaleAndPage($locale, $key);
                return ConvertToTree::fromFlattened($lines, false);
            }

            return null;
        }

        // Return null or '' as is, because null will result in trying to fetch the translation
        // from the file source and an intentional empty string does not.
        if (!$value = $line->getValue($locale, $fallback)) {
            return $value;
        }

        foreach ($replace as $key => $replacer) {
            $value = str_replace(':'.$key, $replacer, $value);
        }

        return $value;
    }
836582
public function state($key = null, $default = null)
    {
        if ($key !== null) {
            return isset($this->state[$key]) ? $this->state[$key] : $default;
        }

        return $this->state;
    }
256615
protected function transactionValue($key)
    {
        if (isset($this->data->transaction) && $this->data->transaction && isset($this->data->transaction->$key)) {
            return $this->data->transaction->$key;
        }

        return null;
    }
1281989
public function get($key, $default = null)
    {
        $value = $this->fetch($key);

        if ( ! is_null($value))
        {
            return $value;
        }

        if ($default != null)
        {
            return $default;
        }

        if ($this->config['fallback'])
        {
            if ( ! is_null($this->config['primary_config_file']))
            {
                $key2 = $this->config['primary_config_file'] . '.' . $key;
                if (Config::has($key2))
                {
                    return Config::get($key2);
                }
            }

            return Config::get($key, null);
        }

        return $default;
    }
260052
public function get($configOption, $fallback = null)
    {
        if (isset($this->configuration[$configOption])) {
            $optionValue = $this->configuration[$configOption];
        } else {
            if (array_key_exists($configOption, $this->configuration)) {
                $optionValue = $fallback;
            }

            try {
                $optionValue = $this->repository->git(sprintf('config --get ' . $configOption));
                $this->configuration[$configOption] = $optionValue;
            } catch (GitRuntimeException $e) {
                $optionValue = $fallback;
                $this->configuration[$configOption] = null;
            }
        }

        return $optionValue;
    }
736555
public function offsetGet($key)
    {
        if (isset($this->states[$key]) and $this->states[$key]->isOpen()) {
            return $this->states[$key];
        }
        throw new NotOpenException('State not open: ' . $key);
    }
1086027
public function get($key)
    {
        $this->load();
        $value = NestedArrayUtil::getNestedArrayValue($this->state, explode('.', $key), $exists);

        return $exists ? $value : false;
    }
122714
public function get($key, $default = null)
    {
        if ($this->offsetExists($key))
        {
            return $this->offsetGet($key);
        }

        return value($default);
    }
1290784
public function get($key, array $replace = array(), $locale = null, $fallback = true)
    {
        // Get without fallback
        $result = parent::get($key, $replace, $locale, false);
        if($result === $key){
            $this->notifyMissingKey($key);

            // Reget with fallback
            $result = parent::get($key, $replace, $locale, $fallback);
            
        }

        return $result;
    }