LeKoala\DebugBar\Proxy\SSViewerProxy
The template parser proxy will monitor the templates that are used during a page request. Since the use of the template parser is behind cache checks, this will only execute during a cache flush.
Synopsis
class SSViewerProxy
extends SSViewer
{
- // members
- protected static array $allTemplates = ;
- protected static boolean $cached = true;
- // methods
- public void process()
- public string getCacheFile()
- public static array getTemplatesUsed()
- public static void resetTemplatesUsed()
- protected static void trackTemplateUsed()
- protected static string normalizeTemplateName()
Hierarchy
Extends
- SilverStripe\View\SSViewer
Members
protected
- $allTemplates
—
array
Tracks all templates used in the current request - $cached
—
boolean
Whether the class has been used, meaning whether the page has been cached
Methods
protected
- normalizeTemplateName() — Remove base path from template
- trackTemplateUsed() — Helps tracking the use of templates
public
- getCacheFile() — Get the cache file for a given template
- getTemplatesUsed() — Get the templates used in the current request and the number of times they were called
- process() — Overloaded to track all templates used in the current request
- resetTemplatesUsed() — Reset the array