Skip to content

Commit

Permalink
add namespace, to be able to reuse class in following examples
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Apr 3, 2019
1 parent 7ca5b75 commit 6dbf046
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/config/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ defined. Each loader should implement
abstract :class:`Symfony\\Component\\Config\\Loader\\FileLoader` class,
which allows for recursively importing other resources::

namespace Acme\Config\Loader;

use Symfony\Component\Config\Loader\FileLoader;
use Symfony\Component\Yaml\Yaml;

Expand Down Expand Up @@ -81,8 +83,9 @@ When it is asked to load a resource, it delegates this question to the
resolver has found a suitable loader, this loader will be asked to load
the resource::

use Symfony\Component\Config\Loader\LoaderResolver;
use Acme\Config\Loader\YamlUserLoader;
use Symfony\Component\Config\Loader\DelegatingLoader;
use Symfony\Component\Config\Loader\LoaderResolver;

$loaderResolver = new LoaderResolver([new YamlUserLoader($fileLocator)]);
$delegatingLoader = new DelegatingLoader($loaderResolver);
Expand Down

0 comments on commit 6dbf046

Please sign in to comment.