Get config through array offset
@param string $key
@return mixed
321980
public function &offsetGet($key)
    {
        if(!$this->has($key))
            return null;

        return DotArray::getReference($this->storage, $key);
    }
1296308
protected static function _getConfigByKey($key) {
		$dbConfig = self::_getEngine()->get($key);
		$fileConfig = Configure::read($key);
		if (!is_null($fileConfig)) {
			$dbConfig = Hash::mergeDiff((array)$dbConfig, $fileConfig);
		}

		return $dbConfig;
	}
1192877
public function &offsetGet($key)
    {
        if (!isset($this->storage[$key])) {
            $this->storage[$key] = null;
        }

        return $this->storage[$key];
    }
1141206
public function getSetting($key)
    {
        if (array_key_exists($key, $this->settings)) {
            return $this->settings[$key];
        } else {
            return false;
        }
    }
737838
public function getConfig(string $key = null)
    {
        if ($key) {
            return $this->getValue($key);
        }

        return $this->config;
    }
661382
public function offsetGet($key)
    {
        if (!isset($this->items[$key])) {
            return null;
        }

        return $this->items[$key];
    }
818063
public function getConfig($key = null) {
		$results = $this->_getConfig($key);
		if (empty($results)) {
			return $results;
		}

		$event = new CakeEvent('Model.afterFind', $this, [$results, true, $key]);
		$event->modParams = 0;
		$this->getEventManager()->dispatch($event);

		return $event->result;
	}
1164477
public function offsetGet($key) {

    $resolved_key = $this->arguments_spec->normalizeOptionName($key);
    if ($resolved_key === null) {
      if (isset($this->merged_arg_values[$key])) {
        return parent::offsetGet($key);
      }
    }

    if (isset($this->merged_arg_values[$resolved_key])) {
      return parent::offsetGet($resolved_key);
    }

    return null;
  }
709476
public function &offsetGet($key)
    {
        $ret = null;

        if (!$this->offsetExists($key)) {
            return $ret;
        }

        $ret =& $this->storage[$key];

        return $ret;
    }
1171240
protected function _getConfig($key = null) {
		$language = Configure::read('Config.language');
		$key = (string)$key;

		if ($key === 'Language') {
			if (empty($language)) {
				return null;
			}

			$configs = $language;
		} else {
			$configPath = $this->_modelConfigSettingsApp->getNameConfigKey();
			if (!empty($key)) {
				$configPath .= '.' . $key;
			}

			$configs = Configure::read($configPath);
			if ($configs === null) {
				return null;
			}

			if (empty($key)) {
				$configs['Language'] = $language;
			}
		}

		if (!empty($key)) {
			$configs = [$key => $configs];
		}

		$listSerializedFields = $this->_modelConfigSettingsApp->getListSerializeFields();
		$result = [];
		foreach ($configs as $configName => $configValue) {
			switch ($configName) {
				case 'EmailSmtppassword':
					if (!empty($configValue)) {
						$result[$this->alias][$configName] = Security::decrypt(base64_decode($configValue), Configure::read('Security.key'));
					} else {
						$result[$this->alias][$configName] = $configValue;
					}
					break;
				default:
					if (in_array($configName, $listSerializedFields) && !empty($configValue)) {
						$configValue = unserialize($configValue);
					}
					$result[$this->alias][$configName] = $configValue;
			}
		}

		if (!empty($key)) {
			return Hash::get($result, $this->alias . '.' . $key);
		}

		if (empty($result)) {
			return null;
		}

		return $result;
	}
1094684
public static function get($key)
    {
        return isset(self::$config[$key]) ? self::$config[$key] : null;
    }
1201475
public function offsetGet($key)
    {
        if (isset($this->attributes[$key])) {
            return $this->attributes[$key];
        }

        return parent::offsetGet($key);
    }
1233047
public function get($key)
    {
        if (isset($this->config[$key])) {
            // if true, 'config' is also always set
            return $this->config[$key]['config'];
        }

        $conf = null;
        $file = $this->getFileNameForKey($key);

        // check if in cache
        if (null !== $this->cache) {
            $cacheKey = $this->getCacheKeyForFile($file);
            $conf = $this->app[$this->cache]->get($cacheKey);
            if (false !== $conf) {
                $this->config[$key] = [
                    'config' => $conf,
                    'cacheKey' => $cacheKey,
                ];

                return $conf;
            }
        }

        // Load from file
        $conf = $this->loader->getConfig($file);
        $this->config[$key] = ['config' => $conf];

        // Store in the cache
        if (null !== $this->cache) {
            $this->config[$key]['cacheKey'] = $cacheKey;
            $this->app[$this->cache]->set($cacheKey, $conf);
        }

        return $conf;
    }
423014
public function getConfig($key)
    {
        if (!isset($this->config[$key])) {
            throw new \Exception(sprintf('No config found for key: "%s"', $key));
        }

        return $this->config[$key];
    }
713533
public function getConfig($key) {
    if (isset($this->config[$key])) {
      return $this->config[$key];
    }
    return FALSE;
  }
80125
public function get($key)
    {
        $setting = $this->getSettingOrFail($key);

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

        return  is_null($value) ? $setting->default() : $value;
    }
658512
protected function iterateConfig(string $key)
    {
        $result = $this->config;

        foreach (explode('.', $key) as $p) {
            if (!isset($result[$p])) {
                return null;
            }

            $result = $result[$p];
        }

        return $result;
    }