public static function compile($sourceFile, $force = false) { $compiledFile = ConfigCompiler::compiled_filename($sourceFile); if ($force || ConfigCompiler::test($sourceFile, $compiledFile)) { $config = ConfigCompiler::parse($sourceFile); $config = self::preprocessConfig($config); ConfigCompiler::write($compiledFile, $config); return $config; } else { return require $compiledFile; } }
public function getTranslation($locale) { $file = $this->getTranslationDir() . DIRECTORY_SEPARATOR . $locale . '.yml'; if (file_exists($file)) { return ConfigCompiler::parse($file); } return array(); }