Template
class Template extends PHP
Mako template view renderer.
Traits
Properties
| protected array | $htmlNamedEntityMap | HTML entity map. | from EscaperTrait | 
| protected FileSystem | $fileSystem | File system instance. | |
| protected string | $cachePath | Cache path. | |
| protected array | $blocks | Template blocks. | |
| protected array | $openBlocks | Open template blocks. | 
Methods
Returns a string that has been escaped for a HTML body context.
Returns a string that has been escaped for a URI or parameter context.
Escapes characters for use in a HTML attribute context.
Returns a string that has been escaped for a HTML attribute context.
Returns a string that has been escaped for a CSS context.
Escapes characters for use in a Javascript context.
Returns a string that has been escaped for a Javascript context.
Returns the rendered view.
Returns the path to the compiled template.
Returns TRUE if the template needs to be compiled and FALSE if not.
Compiles view.
Opens a template block.
Closes a template block.
Output a template block.
Details
        in EscaperTrait at         line 53
                            string
    escapeHTML(string|null $string, string $charset, bool $doubleEncode = true)
        
    
    Returns a string that has been escaped for a HTML body context.
        in EscaperTrait at         line 64
                            string
    escapeURL(string|null $string)
        
    
    Returns a string that has been escaped for a URI or parameter context.
        in EscaperTrait at         line 77
                    protected        string
    attributeEscaper(array $matches)
        
    
    Escapes characters for use in a HTML attribute context.
(This method contains code from the SecurityMultiTool library).
        in EscaperTrait at         line 126
                            string
    escapeAttribute(string|null $string, string $charset)
        
    
    Returns a string that has been escaped for a HTML attribute context.
        in EscaperTrait at         line 151
                    protected        string
    cssEscaper(array $matches)
        
    
    Escapes characters for use in a CSS context.
(This method contains code from the SecurityMultiTool library).
        in EscaperTrait at         line 176
                            string
    escapeCSS(string|null $string, string $charset)
        
    
    Returns a string that has been escaped for a CSS context.
        in EscaperTrait at         line 206
                    protected        string
    javascriptEscaper(array $matches)
        
    
    Escapes characters for use in a Javascript context.
(This method contains code from the SecurityMultiTool library).
        in EscaperTrait at         line 227
                            string
    escapeJavascript(string|null $string, string $charset)
        
    
    Returns a string that has been escaped for a Javascript context.
        at         line 145
                            string
    render(string $__view__, array $__variables__)
        
    
    Returns the rendered view.
        at         line 62
                            
    __construct(FileSystem $fileSystem, string $cachePath)
        
    
    Constructor.
        at         line 74
                    protected        string
    getCompiledPath(string $view)
        
    
    Returns the path to the compiled template.
        at         line 86
                    protected        bool
    needToCompile(string $view, string $compiled)
        
    
    Returns TRUE if the template needs to be compiled and FALSE if not.
        at         line 96
                    protected        
    compile(string $view)
        
    
    Compiles view.
        at         line 106
                            
    open(string $name)
        
    
    Opens a template block.
        at         line 116
                            string
    close()
        
    
    Closes a template block.
        at         line 126
                            
    output(string $name)
        
    
    Output a template block.