[FLOW3-general] Some thoughts about settings & inherited classes
Manuel Strausz
tminus at bitmap.co.at
Thu Dec 31 11:13:20 CET 2009
Hello everyone,
I've been working on some framework addons lately, and I've hit a small
roadblock that got me thinking.
In detail, I was trying to change the default behavior of the
ActionController when selecting a view class. As it is now, the
controller chooses the Fluid TemplateView class when it finds a matching
template. I wanted to make the default view class configurable, since
I'm doing some tests with a special CompositeView class that could be
used for generic nested views.
To do this, I introduced a new setting for the MVC subpackage inside the
FLOW3 configuration Settings.yaml, defaultTemplateView. But, of course,
I couldn't access it... since the actual controller used is in a
completely different package (and not even a Framework package).
The part where I am actually querying the setting is in the inherited
part of the class, but there is no way to access the settings for the
class I inherited from.
My question is, would it make sense to also inject settings from the
class I inherited from (they could act as 'default settings' for all
inherited classes)? Maybe I'm just a bit confused after pulling an
all-nighter :)
Of course I can always inject the configuration manager and query the
settings for the MVC packagge manually, but this just seems 'awkward'
somehow.
Any suggestions/hints would be really appreciated.
regards,
Manuel
More information about the FLOW3-general
mailing list