diff --git a/flextype/Content.php b/flextype/Content.php index 7321c7ee..ecf04d85 100755 --- a/flextype/Content.php +++ b/flextype/Content.php @@ -17,7 +17,6 @@ use Flextype\Component\Http\Http; use Flextype\Component\Filesystem\Filesystem; use Flextype\Component\Event\Event; use Flextype\Component\Registry\Registry; -use Symfony\Component\Yaml\Yaml; use Thunder\Shortcode\ShortcodeFacade; use Thunder\Shortcode\Shortcode\ShortcodeInterface; @@ -365,7 +364,7 @@ class Content $_page = []; // Process $page_frontmatter with YAML and Shortcodes parsers - $_page = Yaml::parse(Content::processShortcodes($page_frontmatter)); + $_page = YamlParser::decode(Content::processShortcodes($page_frontmatter)); // Create page url item $url = str_replace(PATH['pages'], Http::getBaseUrl(), $file_path); diff --git a/flextype/Plugins.php b/flextype/Plugins.php index 3d623cea..2140a288 100755 --- a/flextype/Plugins.php +++ b/flextype/Plugins.php @@ -16,7 +16,6 @@ use Flextype\Component\Filesystem\Filesystem; use Flextype\Component\Event\Event; use Flextype\Component\I18n\I18n; use Flextype\Component\Registry\Registry; -use Symfony\Component\Yaml\Yaml; class Plugins { @@ -290,11 +289,11 @@ class Plugins // Go through... foreach ($plugins_list as $plugin) { if (Filesystem::fileExists($_plugin_settings = PATH['plugins'] . '/' . $plugin . '/settings.yaml')) { - $plugin_settings = Yaml::parseFile($_plugin_settings); + $plugin_settings = YamlParser::decode(Filesystem::getFileContent($_plugin_settings)); } if (Filesystem::fileExists($_plugin_config = PATH['plugins'] . '/' . $plugin . '/'. $plugin. '.yaml')) { - $plugin_config = Yaml::parseFile($_plugin_config); + $plugin_config = YamlParser::decode(Filesystem::getFileContent($_plugin_config)); } $_plugins_config[basename($_plugin_config, '.yaml')] = array_merge($plugin_settings, $plugin_config); @@ -311,7 +310,7 @@ class Plugins foreach ($plugins_list as $plugin) { $language_file = PATH['plugins'] . '/' . $plugin . '/languages/' . $locale . '.yaml'; if (Filesystem::fileExists($language_file)) { - I18n::add(Yaml::parseFile($language_file), $locale); + I18n::add(YamlParser::decode(Filesystem::getFileContent($language_file)), $locale); } } } diff --git a/flextype/Themes.php b/flextype/Themes.php index a0df9f41..1d9105ad 100644 --- a/flextype/Themes.php +++ b/flextype/Themes.php @@ -15,7 +15,6 @@ namespace Flextype; use Flextype\Component\Filesystem\Filesystem; use Flextype\Component\View\View; use Flextype\Component\Registry\Registry; -use Symfony\Component\Yaml\Yaml; class Themes { @@ -84,8 +83,8 @@ class Themes } else { if (Filesystem::fileExists($theme_settings = PATH['themes'] . '/' . $theme . '/' . 'settings.yaml') and Filesystem::fileExists($theme_config = PATH['themes'] . '/' . $theme . '/' . $theme . '.yaml')) { - $theme_settings = Yaml::parseFile($theme_settings); - $theme_config = Yaml::parseFile($theme_config); + $theme_settings = YamlParser::decode(Filesystem::getFileContent($theme_settings)); + $theme_config = YamlParser::decode(Filesystem::getFileContent($theme_config)); $_theme = array_merge($theme_settings, $theme_config); Registry::set('themes.'.Registry::get('settings.theme'), $_theme); Cache::save($theme_cache_id, $_theme);