Load attributes from config file.

@param  string  $key
@param  array   $default
777393
protected function loadAttributes($key, array $default = [])
    {
        $attributes = config($key, $default);

        if (isset($attributes['prefix']))
            $this->addPrefix($attributes['prefix']);

        if (isset($attributes['namespace']))
            $this->setNamespace($attributes['namespace']);

        if (isset($attributes['as']))
            $this->setRouteName($attributes['as']);

        if (isset($attributes['middleware']))
            $this->setMiddlewares($attributes['middleware']);
    }
728807
protected function loadConfigFile(string $key)
    {
        $key = strtolower($key);
        $filename = $this->path . DIRECTORY_SEPARATOR . ucfirst($key) . Config::CONFIG_FILE_EXTENSION;

        if (file_exists($filename)) {
            $this->configuration[$key] = require $filename;
            return;
        }

        throw new ConfigException('Unable to load resource: ' . $filename);
    }
65083
public function config($key, $default = null)
    {
        $parts = explode('.', $key);

        $filename = head($parts);

        $parts = array_slice($parts, 0);

        $path = $this->path . "/config/config.php";

        if (! file_exists($path)) {
            $path = $this->path . "/config/{$filename}.php";
        }

        $key = implode('.', $parts);

        $config = file_exists($path) ? require $path : [];

        return array_get($config, $key, $default);
    }
1345427
public function config(string $key, $default = null)
    {
        $fullnameKey = $this->getNamespace().'_'.$key;

        return $this->config->get($fullnameKey, $default);
    }
812725
public function config(string $key = null, $default = null)
    {
        $key = $key ? sprintf('%s.%s', $this->getId(), $key) : $this->getId();

        return config($key, $default);
    }
413436
final protected function getStringValue(string $key, string $default = ''): string
    {
        $value = $this->getConfigValue($key);
        if (!$value) {
            return $default;
        }

        return strval($value);
    }
872454
public function get($key, $default = null)
    {
        $values = $this->readFileContents();

        if ($this->has($key)) {
            return $values[$key][self::VALUE];
        }

        return $default;
    }
100394
protected function _getConfigValue( $key, $default = null )
	{
		$config = $this->_item->getConfig();

		if( isset( $config[$key] ) ) {
			return $config[$key];
		}

		return $default;
	}
146185
public function getConfig($key, $default = null)
	{
		$array = $this->config;

		if (is_null($key))
		{
			return $array;
		}

		if (isset($array[$key]))
		{
			return $array[$key];
		}

		foreach (explode('.', $key) as $segment)
		{
			if ( ! is_array($array) || ! array_key_exists($segment, $array))
			{
				return $default;
			}

			$array = $array[$segment];
		}

		return $array;
	}
975396
public function get($key, $default = null) {
		$keys = explode('.', $key);
		$conf = empty($this->environment) ? $this->conf : $this->conf[$this->environment];
		foreach ($keys as $v) {
			if (isset($conf[$v])) {
				$conf = $conf[$v];
			} else {
				return $default;
			}
		}
		return $conf;
	}
1325275
public function getConfig($key, Configuration $default = NULL)
	{
		$resolved = false;
		$value = $this->getByKey($key, $this->data, $resolved);
		
		if($resolved)
		{
			return new static($value);
		}
		
		return ($default === NULL) ? new static() : $default;
	}
658329
protected function get($key, $default = null)
    {
        $val = dot_access($this->configuration, $key);
        return $val !== null ? $val : $default;
    }
944932
public function config($key, $val = null, $default = null)
    {
        if ($val == null) {
            return Config::get($key, $default);
        } else {
            Config::set($key, $val);
        }
    }
227407
public function get($key, $default = null)
	{
		$this->load();

		return ArrayUtil::get($this->data, $key, $default);
	}
936717
public function getAttribute($key, $default = null)
	{
		$this->_fetchAttributes();
		$getter = 'get' . $key;
		if (method_exists($this, $getter)) {
			return $this->$getter();
		} else {
			return isset($this->attributes[$key]) ? $this->attributes[$key] : $default;
		}
	}
5894
private static function setDefaultAttributes(array $attributes, array $default): array
    {
        foreach ($default as $name => $value) {
            if (!\array_key_exists($name, $attributes)) {
                $attributes[$name] = $value;
            }
        }
        return $attributes;
    }
985538
public function getSessionAttribute($key, $default = false) {
		return isset($this->sessionAttributes[$key]) ? $this->sessionAttributes[$key] : $default;
	}