private function loadFromFile($filename, $overwrite = false)
    {
        try {
            $yamlDatas = Yaml::parse(file_get_contents($filename));

            if (is_array($yamlDatas)) {
                if (true === $this->debug) {
                    $this->debug_data[$filename] = $yamlDatas;
                }

                if (self::CONFIG_FILE.'.'.self::EXTENSION === basename($filename) ||
                    self::CONFIG_FILE.'.'.$this->environment.'.'.self::EXTENSION === basename($filename)) {
                    foreach ($yamlDatas as $component => $config) {
                        if (!is_array($config)) {
                            $this->container->get('logger')->error('Bad configuration, array expected, given : '.$config);
                        }
                        $this->setSection($component, $config, $overwrite);
                    }
                } else {
                    $this->setSection(basename($filename, '.'.self::EXTENSION), $yamlDatas, $overwrite);
                }
            }
        } catch (ParseException $e) {
            throw new InvalidConfigException($e->getMessage(), null, $e, $e->getParsedFile(), $e->getParsedLine());
        }
    }