Closed helios-ag closed 7 years ago
Another approach is to inject parameters directly, so we can process them inside hook. Yaml file can be read by Yaml\Parser. What is your opinion, @alquerci ?
inject parameters directly
Indeed here we just need of all container parameters but it is not possible to inject all of them.
Yaml file can be read by Yaml\Parser.
I do not understand you idea with this sentence. A parser can only parse and do not anything else.
This is the exception to the rule of not injecting the container.
The behind feature is a way to use all container parameters to avoid duplicate configuration like shown on the README:
# path/to/emoticons.yml
imports:
- { resource: path/to/another/emoticons.yml }
emoticons:
my_emoticon:
url: # Default: %fm_bbcode.emoticon.path%/my_emoticon.png
html: # Default: <img src="%fm_bbcode.emoticon.path%/my_emoticon.png" alt="" >
xHtml: # Default: <img src="%fm_bbcode.emoticon.path%/my_emoticon.png" alt="" />
smilies:
- ":my_emoticon:"
In order to keep back compatibility we cannot remove this feature.
But it's possible that is only useful to resolve the fm_bbcode.emoticon
parameter namespace. In that case we can inject only all needed parameters to resolve them for the next major version (it is a regression).
I do not understand you idea with this sentence. A parser can only parse and do not anything else.
My idea was to address emoticon file via fm_bbcode.emoticon parameter, and then process it, so we were able to avoid inject whole container.
This is the exception to the rule of not injecting the container.
Ok i got it.
in Decoda/Hook/EmoticonHook.php, line 56
Posted from SensioLabsInsight