Get the value from the config by "path"

@param string $path Path to config option (Ex. "foo.bar.baz")
@return mixed Either the found value or null if not found
501895
public function get($path)
    {
        $p = explode('.', $path);
        $cfg = &$this->config;
        $count = 1;

        foreach ($p as $part) {
            if (array_key_exists($part, $cfg)) {
                // see if it's the end
                if ($count == count($p)) {
                    echo 'end';
                    return $cfg[$part];
                }
                $cfg = &$cfg[$part];
            }
            $count++;
        }
        return null;
    }
1032454
protected function _getRalativePath($path)
    {
        if ($path) {
            $rootPath = str_replace(array('/', '\\'), '/', self::$_config['root']);

            $path = str_replace(array('/', '\\'), '/', $path);
            $path = str_replace($rootPath, '/', $path);
            $path = str_replace('//', '/', $path);
            $path = trim($path, '/');
        }
        return $path;
    }
1071699
private function getPath($path)
    {
        return $this->root .
            ltrim(
                preg_replace(
                    sprintf('|%s{2,}|', preg_quote(DIRECTORY_SEPARATOR)),
                    DIRECTORY_SEPARATOR,
                    $path
                ),
                DIRECTORY_SEPARATOR
            );
    }
445544
public function get($path, $default = null)
	{
		// Return default value if path is empty
		if (empty($path))
		{
			return $default;
		}

		if (!strpos($path, $this->separator))
		{
			return (isset($this->data->$path) && $this->data->$path !== null && $this->data->$path !== '') ? $this->data->$path : $default;
		}

		// Explode the registry path into an array
		$nodes = explode($this->separator, trim($path));

		// Initialize the current node to be the registry root.
		$node  = $this->data;
		$found = false;

		// Traverse the registry to find the correct node for the result.
		foreach ($nodes as $n)
		{
			if (\is_array($node) && isset($node[$n]))
			{
				$node  = $node[$n];
				$found = true;

				continue;
			}

			if (!isset($node->$n))
			{
				return $default;
			}

			$node  = $node->$n;
			$found = true;
		}

		if (!$found || $node === null || $node === '')
		{
			return $default;
		}

		return $node;
	}
1069236
private function getValue ($key)
    {
        return isset($this->configuration[$key])
            ? $this->configuration[$key]
            : null;
    }
415190
public static function config($path)
    {
        $data = \UtilsSandboxLoader('application/Config/' . strtr($path, '.', '/') . '.php');

        foreach ($data as $key => $value) {
            self::env($key, $value);
        }

        $data = null;
    }
194344
protected static function _getConfigForLoad($path)
    {
        $config    = ['autoload' => true];
        $routes    = $path . 'config' . DS . Plugin::FILE_ROUTES;
        $bootstrap = $path . 'config' . DS . Plugin::FILE_BOOTSTRAP;

        if (FS::isFile($bootstrap)) {
            $config['bootstrap'] = true;
        }

        if (FS::isFile($routes)) {
            $config['routes'] = true;
        }

        $config['path'] = $path;

        return $config;
    }
339499
public function get($path)
    {
        // Make sure we have a file
        if (empty($path)) {
            return null;
        }

        // Generate file URL
        $url = $this->urlProvider->getUrlFromPath($path);

        // Validate file URL
        if (! filter_var($url, FILTER_VALIDATE_URL)) {
            return null;
        }

        return $url;
    }
1165500
protected function getPath($path)
	{
		$rootPath = $this->option('path');

		return $rootPath.'/'.strtolower($this->getTheme()).'/' . $path;
	}
421590
public function loadConfig($path)
    {
        //add extension to the config file
        $path = sprintf("%s.%s", $path, $this->config_file_extension);

        //lets try loading the config file data
        return $this->loader->load($path);
    }
815424
public function get($path)
    {
        return $this->settingManager->get($path, $this->tokenStorage->getToken()->getUsername());
    }
852029
public function getConfigurationOverride($path)
    {
        $validPath = DauxHelper::findLocation($path, $this->local_base, 'DAUX_CONFIGURATION', 'file');

        if ($validPath === null) {
            return null;
        }

        if (!$validPath) {
            throw new Exception('The configuration override file does not exist. Check the path again : ' . $path);
        }

        return $validPath;
    }
407510
public static function getValueFromXPath($path, \DOMXPath $xpath, \DomNode $context = null, $default = null)
    {
        $result = $xpath->query($path, $context);
        if (0 === $result->length) {
            return $default;
        }

        $item = $result->item(0);
        if (null === $item) {
            return $default;
        }

        return $item->nodeValue;
    }
362771
private static function find($path)
    {
        $view_path = null;
        foreach (self::$directories as $directory) {
            $formatted_path = self::formatPath($directory . '/' . $path);
            if (self::isValidPath($formatted_path)) {
                $view_path = $formatted_path;
                break;
            }
        }
        
        if (empty($view_path)) {
            if (self::$report_errors) {
                die('View not found: ' . $view_path);
            }
            return null;
        }
        
        return $view_path;
    }
857711
public static function getPath($path = '')
    {
        $path = ltrim($path, '/\\');
        $path = sprintf('%s%s%s', self::$applicationRoot, DIRECTORY_SEPARATOR, $path);
        $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
        return $path;
    }
1263065
protected function resolvePath($path)
    {
        $parts = explode('.', $path);
        $settings = $this->settings;
        foreach ($parts as $part) {
            if (!isset($settings[$part])) {
                return null;
            }
        
            $settings = $settings[$part];
        }
        
        return $settings;
    }
607148
private function getCacheProviderConfig($path)
    {
        $cacheProvider = null;

        if (!empty($this->config[$path]) && !empty($this->config[$path]['cache'])) {
            $cacheProvider = $this->config[$path];
        }

        if (!$cacheProvider
            && !empty($this->config['default'])
            && !empty($this->config['default']['cache'])
        ) {
            $cacheProvider = $this->config['default'];
        }

        return $cacheProvider;
    }