@param string $pathname Configuration file pathname

@return array
@throws \Darvin\AdminBundle\Metadata\Configuration\ConfigurationException
357390
private function getMergedConfig($pathname)
    {
        $hierarchy = [];

        $childPathname = $pathname;
        $childRealPathname = $this->resolveRealPathname($childPathname, true);

        $hierarchy[] = $child = $this->getConfig($childRealPathname);

        while (isset($child['extends'])) {
            $parentPathname = $child['extends'];
            $parentRealPathname = $this->resolveRealPathname($parentPathname, $parentPathname !== $childPathname);

            if ($parentRealPathname === $childRealPathname) {
                throw new ConfigurationException(sprintf('Configuration file "%s" tried to extend itself.', $childRealPathname));
            }

            $childPathname = $parentPathname;
            $childRealPathname = $parentRealPathname;

            $hierarchy[] = $child = $this->getConfig($childRealPathname);
        }
        foreach ($hierarchy as $key => $config) {
            unset($hierarchy[$key]['extends']);
        }

        $merged = [];

        foreach (array_reverse($hierarchy) as $key => $config) {
            if (0 === $key) {
                $config = $this->mergeConfigParams($config);
            }

            $merged = $this->mergeConfigs($merged, $config);
        }

        return [$merged];
    }
326714
protected static function getLocalConfiguration($dirname)
    {
        if (is_dir($dirname) && empty(self::$localConfigurations[$dirname])) {
            $localConfig                         = $dirname.DIRECTORY_SEPARATOR.'local.json';
            self::$localConfigurations[$dirname] = file_exists($localConfig) ?
                (array)@\json_decode(file_get_contents($localConfig)) : [];
        }

        return self::$localConfigurations[$dirname];
    }
518687
public static function getFile($sName) {
		$sFile        =& static::$_lFile[$sName];
		$sFileDefault =& static::$_lFileDefault[$sName];
		return [
			'file' => $sFile,
			'file_default' => $sFileDefault,
		];
	}
161656
private function getDirs($fileName)
    {
        if (is_file($fileName)) {
            return [];
        }

        $currentDir = getcwd();

        if (is_dir($fileName)) {
            $currentDir = $fileName;
        }

        $dirs[] = $currentDir;
        if (is_dir($currentDir.'/conf')) {
            $dirs[] = $currentDir.'/conf';
        }
        if (is_dir($currentDir.'/config')) {
            $dirs[] = $currentDir.'/config';
        }

        return $dirs;
    }
820841
public static function findFiles(InputInterface $input)
    {
        if ($input->hasParameterOption('--config-file')) {
            $file = $input->getParameterOption('--config-file');
            if (file_exists($file)) {
                return [$file];
            }

            throw new ConfigurationFileNotFoundException(
                sprintf("Couldn't find the configuration file: %s", $file)
            );
        }

        $format = $input->hasParameterOption('--config-format')
            ? $input->getParameterOption('--config-format')
            : static::$DEFAULT_TYPE
        ;

        return [
            sprintf("%s.%s", static::$NAME, $format),
            sprintf("%s.%s.dist", static::$NAME, $format)
        ];
    }
1327360
public function getCopyLeftAuthors($pathName)
    {
        $result = [];
        foreach ($this->copyLeft as $author => $paths) {
            if ($this->matchPatterns($pathName, $paths)) {
                $realAuthor                           = $this->getRealAuthor($this->copyLeftReal[$author]);
                $result[$this->arrayKey($realAuthor)] = $realAuthor;
            }
        }

        return $result;
    }
752188
public static function getConfigList(string $entityName, string $objectName): array
    {
        $configs = [];

        $subdir = self::getConfigTypeDir($objectName);
        $path = CONFIG . 'Modules' . DS . $entityName . DS . 'config' . DS . $subdir;

        $files = self::getModuleFiles($path);
        $list = self::getModuleConfigNames($entityName, $files, $path);

        foreach ($list as $file => $caption) {
            $configs[$caption] = $caption;
        }

        return $configs;
    }
731097
public function load(string $filename)
  {
    # Attempt to load config file
    if ( \file_exists($filename) ) {
      # Set filename
      $this->filename = $filename;

      # Load the config
      $configArray = \json_decode( \file_get_contents($filename), true);

      if ($configArray) {
        // $configArray = $this->array_change_key_case_recursive($configArray); // Lowercase the keys
        # Merge the Config with existing config
        // $this->confValues = \array_replace_recursive($this->confValues, $configArray);
        $this->confValues = $configArray;
      } else {
        throw new SpinException('Invalid JSON file "'.$filename.'"');

      }
    }

    return $this;
  }
214633
public function getSDPFilesConfig($serverName, $vhostName)
    {
        list($response) = $this->getSDPFilesConfigWithHttpInfo($serverName, $vhostName);
        return $response;
    }
1327583
public function directories($directoryName)
    {
        if (!$this->isDir($directoryName)) {
            throw new FileNotFoundException('Directory not found in the path [ ' . $directoryName . ' ].');
        }

        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($directoryName,
                RecursiveDirectoryIterator::CURRENT_AS_FILEINFO)
        );

        $directories = [];

        foreach($iterator as $file) {
            if($file->isDir()) {
                if( !(substr($file,-2) === '..')) {
                    $directories[] = trim($file,'.');
                }
            }
        }

        array_shift($directories);

        return $directories;
    }
144625
public static function getFilenames($pathname, $extension = null) {

        // Check if the directory exists.
        if (false === file_exists($pathname)) {
            throw new FileNotFoundException($pathname);
        }

        // Initialize the filenames.
        $filenames = [];

        // Open the directory.
        if (false !== ($directory = opendir($pathname))) {

            // Initialize the offset.
            $offset = strlen($extension);

            // Read the directory.
            while (($file = readdir($directory)) !== false) {

                // Determines if the file should be added.
                if (false === in_array($file, [".", ".."]) && ((null === $extension) || 0 === substr_compare($file, $extension, -$offset))) {
                    $filenames[] = $file;
                }
            }

            // Close the directory.
            closedir($directory);
        }

        // Return the filenames.
        return $filenames;
    }
1066425
public function files($dirname = '.')
    {
        $listing = $this->listDirectoryContents($dirname);

        return array_values(array_filter($listing, function ($item) {
            return $item['type'] === 'file';
        }));
    }
284110
static public function createFromFile($pathname)
    {
        if (!file_exists($pathname)) {
            throw new ImageFileNotFoundException($pathname);
        }
        $ii = getimagesize($pathname);
        $width = $ii[0];
        $height = $ii[1];
        $imagetype = $ii[2];
        $last_modified = filemtime($pathname);
        $exif = @exif_read_data($pathname);
        if (isset($exif['Orientation'])) {
            $orientation = $exif['Orientation'];
        } else {
            $orientation = 0;
        }
        return new static($pathname, $width, $height, $imagetype, $last_modified, $orientation);
    }
833843
protected function loadConfigFromFile($filename)
    {
        $contents = file_get_contents($filename);
        if ($contents === false) {
            throw new \RuntimeException('Failed to read config file: ' . $filename);
        }

        return (array) Yaml::parse($contents);
    }
116329
public function getConfiguration($filename) {

        $cacheManager = new CacheManager();
        $configuration = $cacheManager->retrieveFromCache('/' . $filename);
        if (!is_array($configuration)) {
            return null;
        }
        $config = new Config($configuration);
        $cacheManager = null;

        return $config;
    }
1261413
protected function getData( $filename )
    {

        $matches = [];

        $regex = '/(.+)-([0-9_]+)x([0-9_]+)(-resize)*(\-\[([\-\d\.]+)x([\-\d\.]+)\])*\.([A-z]+)$/';

        preg_match( $regex, $filename, $matches );


        $path = $matches[1];
        $extension = $matches[8];
        $imagePath = sprintf( '%s/%s.%s', dirname( $filename ), basename( $path ), $extension );

        $width = $matches[2];
        $height = $matches[3];

        $focusX = $matches[6];
        $focusY = $matches[7];

        return [
            'filepath'=> $imagePath,
            'resize'=> $matches[4] != '',

            'width'=> $width != '_' ? $width : null,
            'height'=> $height != '_' ? $height : null,

            'focusX' => $focusX != '' ? $focusX : null,
            'focusY' => $focusY != '' ? $focusY : null,
        ];

    }
12856
private function processConfiguration(array $config, $pathname)
    {
        $processor = new Processor();

        try {
            return $this->parameterBag->resolveValue($processor->processConfiguration(new Configuration(), $config));
        } catch (InvalidConfigurationException $ex) {
            throw new ConfigurationException(
                sprintf('Configuration file "%s" is invalid: "%s".', $pathname, $ex->getMessage())
            );
        }
    }