From c659e7858ad91bc54cd5fbe3d2f9d151645f809b Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 11 Nov 2012 12:59:36 +0100 Subject: [PATCH] Make YamlFileLoader and XmlFileLoader file loading extensible By changing visibility to protected it becomes possible to extend the loader and cache file contents. phpBB needs this. --- .../Component/DependencyInjection/Loader/XmlFileLoader.php | 2 +- .../Component/DependencyInjection/Loader/YamlFileLoader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index b3a6fca4cf..a5c5ecdca7 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -204,7 +204,7 @@ class XmlFileLoader extends FileLoader * * @throws \InvalidArgumentException When loading of XML file returns error */ - private function parseFile($file) + protected function parseFile($file) { $internalErrors = libxml_use_internal_errors(true); $disableEntities = libxml_disable_entity_loader(true); diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index 6ef3e7317c..71de4ac659 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -233,7 +233,7 @@ class YamlFileLoader extends FileLoader * * @return array The file content */ - private function loadFile($file) + protected function loadFile($file) { return $this->validate(Yaml::parse($file), $file); }