-
-
Couldn't load subscription status.
- Fork 5.3k
File loaders can now set the type to load explicitly #7353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
abea996 bc720e8 a4f3354 c05ca14 e547053 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -87,8 +87,16 @@ the resource:: | |
| $loaderResolver = new LoaderResolver(array(new YamlUserLoader($locator))); | ||
| $delegatingLoader = new DelegatingLoader($loaderResolver); | ||
| | ||
| $delegatingLoader->load(__DIR__.'/users.yml'); | ||
| /* | ||
| The YamlUserLoader will be used to load this resource, | ||
| // YamlUserLoader is used to load this resource because it supports | ||
| // files with the '.yml' extension | ||
| since it supports files with a "yml" extension | ||
| */ | ||
| $delegatingLoader->load(__DIR__.'/users.yml'); | ||
| | ||
| .. tip:: | ||
| | ||
| If your application uses unconventional file extensions (for example, your | ||
| YAML files have a ``.res`` extension) you can pass the file type as the | ||
| ||
| second optional parameter of the ``load()`` method:: | ||
| | ||
| // ... | ||
| $delegatingLoader->load(__DIR__.'/users.res', 'yml'); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be removed, right?