Bug #2824

TemplateView can't be easily extended

Added by Bastian Waidelich over 12 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Must have
Category:
-
Target version:
-
Start date:
2009-03-11
Due date:
% Done:

0%

Estimated time:
Has patch:

Description

When using custom views that extend F3\Fluid\View\TemplateView the required cache backend is not properly initialized because FLOW3s dependency injection is active only for configured classes, not their subclasses.
First I thought this was a bug in the DI mechanism. Meanwhile I'm not sure anymore and I don't know, how other DI-frameworks handle this issue.

A solution would be to extract cache handling into an AOP aspect which is active for subclasses too. Patch follows.


Files

Fluid_2824.patch (11.5 KB) Fluid_2824.patch Bastian Waidelich, 2009-03-11 23:49
#1

Updated by Bastian Waidelich over 12 years ago

Attached is a patch that extracts syntax tree cache handling into an AOP aspect. I've added an Interface to be able to activate the advice for all implementing classes.
To be able to deactivate caching during development, I've added a Settings.yaml - The caching aspect will only be active if Fluid.syntaxTreeCache.enable is set.
Note: I couldn't verify whether this patch breaks any unit tests, as my test runner does not work at the moment.
NoteĀ²: Please double-check the Patch. Windows creates diffs with CRLF line-endings

#2

Updated by Sebastian Kurfuerst over 12 years ago

  • Status changed from New to Resolved
  • Assignee set to Sebastian Kurfuerst

committed :-) Thanks Bastian!

Also available in: Atom PDF