public function getConfigPath($fileName, $configPath = null)
    {
        if (!isset($this->configPath)) {
            $this->configPath = $this->guessConfigPath();
        }

        if (!$configPath) {
            $configPath = $this->configPath;
        }

        $fileName = File::symbolizePath($fileName);

        if (File::isLocalPath($fileName) ||
            (!Config::get('cms.restrictBaseDir', true) && realpath($fileName) !== false)
        ) {
            return $fileName;
        }

        if (!is_array($configPath)) {
            $configPath = [$configPath];
        }

        foreach ($configPath as $path) {
            $_fileName = $path . '/' . $fileName;
            if (File::isFile($_fileName)) {
                return $_fileName;
            }
        }

        return $fileName;
    }
public function getConfigPath($fileName, $configPath = null)
    {
        if (!isset($this->configPath)) {
            $this->configPath = $this->guessConfigPath();
        }

        if (!$configPath) {
            $configPath = $this->configPath;
        }

        $fileName = File::symbolizePath($fileName);

        if (File::isLocalPath($fileName) ||
            (!Config::get('cms.restrictBaseDir', true) && realpath($fileName) !== false)
        ) {
            return $fileName;
        }

        if (!is_array($configPath)) {
            $configPath = [$configPath];
        }

        foreach ($configPath as $path) {
            $_fileName = $path . '/' . $fileName;
            if (File::isFile($_fileName)) {
                return $_fileName;
            }
        }

        return $fileName;
    }
public function getConfigPath ( $ fileName , $ configPath = null ) { if ( ! isset ( $ this -> configPath ) ) { $ this -> configPath = $ this -> guessConfigPath ( ) ; } if ( ! $ configPath ) { $ configPath = $ this -> configPath ; } $ fileName = File :: symbolizePath ( $ fileName ) ; if ( File :: isLocalPath ( $ fileName ) || ( ! Config :: get ( 'cms.restrictBaseDir' , true ) && realpath ( $ fileName ) !== false ) ) { return $ fileName ; } if ( ! is_array ( $ configPath ) ) { $ configPath = [ $ configPath ] ; } foreach ( $ configPath as $ path ) { $ _fileName = $ path . '/' . $ fileName ; if ( File :: isFile ( $ _fileName ) ) { return $ _fileName ; } } return $ fileName ; }
Locates a file based on it's definition. If the file starts with
the ~ symbol it will be returned in context of the application base path,
otherwise it will be returned in context of the config path.
@param string $fileName File to load.
@param mixed $configPath Explicitly define a config path.
@return string Full path to the config file.
Locates a file based on it s definition . If the file starts with the ~ symbol it will be returned in context of the application base path otherwise it will be returned in context of the config path .