static function get_shared_data() { if (self::$shared) { return self::$shared; } $shared_file_path = file_exists(Config::$content_folder . '/_shared.yml') ? Config::$content_folder . '/_shared.yml' : Config::$content_folder . '/_shared.txt'; if (file_exists($shared_file_path)) { return self::$shared = sfYaml::load($shared_file_path); } else { return array(); } }
static function get_shared_data() { if (self::$shared) { return self::$shared; } $shared_file_path = file_exists(Config::$content_folder . '/_shared.yml') ? Config::$content_folder . '/_shared.yml' : Config::$content_folder . '/_shared.txt'; if (file_exists($shared_file_path)) { # Correct formatting of fenced content $content = file_get_contents($shared_file_path); $content = self::preparse_text($content); return self::$shared = sfYaml::load($shared_file_path); } else { return array(); } }