Classes
Marks method as a template filter.
Marks method as a template function.
BlueScreen panels for Tracy 2.x
Bar panel for Tracy 2.x
Extension for Tracy 2.x
Template compilation failed.
Removes one level of indentation introduced by paired Latte tags.
Context-aware escaping.
Base class for AST nodes representing parsed template structure.
Utility functions for working with AST nodes.
Traverses and transforms AST nodes using visitor pattern.
Base for nodes representing template content that produces output.
Code generator hidden from compiler passes. Pass child nodes for traversal.
Container for sequence of child nodes.
HTML attribute with name, optional value, and quote style.
DOCTYPE or bogus HTML tags.
HTML comment ().
HTML/XML element with attributes, content, and n:attribute support.
Dynamic HTML attribute generated from expression.
Helper node for rendering HTML tags with n:tag and n:tag* support.
Placeholder for removed or filtered-out content.
Function/method argument with optional name, reference, and unpacking.
Array item with optional key, reference, and spread operator.
Closure use variable ($var or &$var).
Base for complex type declarations (nullable, union, intersection).
Base for PHP expression nodes (variables, operators, calls, literals).
Array or string element access ($arr[$key]).
Array literal.
Assignment ($var = expr or $var = &$ref).
Compound assignment ($var += expr, $var .= expr, etc.).
Code generator hidden from compiler passes. Pass child nodes for traversal.
Binary operation: arithmetic, logical, bitwise, comparison, null-coalescing, or pipe.
Type cast (int), (string), (array), etc.
Class constant access (Foo::CONST or Foo::class).
Object cloning (clone $obj).
Closure or arrow function (fn($x) => $x or function($x) use ($y) {}).
Global constant access (CONST or \CONST).
empty() language construct.
Expression with filter applied ($expr|filter).
Function call with partial application or first-class callable support.
Latte's in operator compiled to in_array() with strict mode.
instanceof type check.
isset() language construct.
Match expression.
Method call with nullsafe support, partial application, or first-class callable.
Object instantiation (new ClassName or new $expr).
Postfix increment/decrement ($var++, $var--).
Prefix increment/decrement (++$var, --$var).
Property access with nullsafe support ($obj->prop, $obj?->prop).
Static method call with partial application or first-class callable support.
Static property access (Foo::$prop).
Temporary container for partial parsing results (e.g., array destructuring).
Ternary conditional ($cond ? $then : $else) or elvis operator ($a ?: $b).
Unary prefix operation (+, -, ~, @, !).
Variable access ($name or ${expr} for variable variables).
Single filter with name, arguments, and nullsafe flag (|name:arg).
Simple identifier (unqualified name).
Literal part of interpolated string.
Intersection type (Type1&Type2).
Array destructuring item.
Array destructuring ([$a, $b] = $arr).
Match expression arm with conditions and body.
Chain of filters with auto-escape flag.
Qualified name for functions, classes, or constants (\Foo\Bar).
Nullable type (?Type).
Interface for expression nodes that represent operators with precedence.
Function parameter with type, default value, and variadic support.
Base for literal value nodes (strings, numbers, booleans, null).
Boolean literal (true/false).
Floating-point literal including infinity and NaN.
Integer literal in decimal, hex, octal, or binary notation.
Double-quoted string with embedded expressions ("Hello $name").
Null literal.
String literal, single or double quoted.
Type not expressible in native PHP syntax (e.g., int[], array<K,V>).
Union type (Type1|Type2).
Identifier for static property name in Foo::$bar syntax.
Placeholder ... for partial function application or first-class callable creation.
{= $expr|filter} Outputs escaped expression.
Base for Latte tags like {if}, {foreach}, {block}.
Root of template AST containing head declarations and main content fragment.
Literal text content in template.
PHP helpers.
Source position (line, column, byte offset) within a template.
Context for PHP code generation with escaping management.
Source range (starting position plus byte length) within a template.
Represents a Latte tag or n:attribute during parsing.
Lexer for PHP-like expression language used in tags.
Parser for PHP-like expression language used in tags.
Template code generator.
Tokenizes Latte template source code.
Parses Latte template tokens into AST.
Template parser extension for HTML.
Token produced by lexers.
Lazy token buffer over an iterator with random-access peek and consume operations.
Content type constants for context-aware escaping.
Templating engine Latte.
Iterates over key-value pairs.
Generates blueprint of template class.
Smarter caching iterator.
Basic tags and filters for Latte.
Template filters. Uses UTF-8 only.
{block [local] name} ... {/block} {block|filter} ... {/block} (anonymous filter block)
{capture $var} ... {/capture} Captures block output into variable.
{contentType html|xml|js|css|text|...} Switches escaping mode and optionally sends HTTP header.
Wrapper for custom function calls in Latte expressions.
{debugbreak [$cond]} Triggers debugger breakpoint.
{define name($params)} ... {/define} Defines reusable block with parameters.
{do $expr} Executes expression without output.
{dump [$var]} Dumps variable or all variables to Tracy Bar.
{embed 'file.latte'|#block} ... {/embed}
{extends 'parent.latte'} {layout 'layout.latte'}
{first} ... {/first}, {last} ... {/last}, {sep} ... {/sep} Loop iteration helpers inside {foreach}.
{for $i = 0; $i < 10; $i++} ... {/for}
{foreach $array as $item} ... {/foreach} {foreach $array as $key => $value} ... {else} ... {/foreach}
{ifchanged [$var]} ... {/ifchanged} Renders content only when value changes between iterations.
Omits element if content is empty or whitespace only.
{if $cond} ... {elseif $cond} ... {else} ... {/if} {ifset $var} ... {elseifset $var} ... {/ifset}
{import 'file.latte'} Imports block definitions from another template.
{include #name|parent|this [from 'file.latte']}
{include 'file.latte' [with blocks]}
{iterateWhile [$cond]} ... {/iterateWhile [$cond]} Groups consecutive items in {foreach} by condition.
{breakIf $cond}, {continueIf $cond}, {skipIf $cond}, {exitIf $cond} Note: {skipIf} is like {continueIf} but doesn't increment $iterator->counter.
{parameters [Type] $name [= default], ...} Declares and filters template parameters.
{php code} (requires RawPhpExtension)
{rollback} Discards {try} block output and jumps to {else}.
{spaceless} ... {/spaceless} Removes whitespace between HTML tags.
{switch $expr} {case $val} ... {default} ... {/switch} Uses strict comparison (===) without fallthrough.
{templatePrint [ClassName]} Suggests parameter class for {templateType}.
{templateType App\MyTemplateClass} Declares parameter types via class for IDE autocompletion.
{trace} Throws exception with template stack trace.
{translate} ... {/translate} Translates block content.
{try} ... {else} ... {/try} Discards block output on exception, renders {else} instead.
{var [type] $name = value} {default $name = value}
{varPrint [all]} Suggests {varType} declarations for variables.
{varType Type $name} Declares variable type for IDE autocompletion.
{while $cond} ... {/while} {while} ... {/while $cond}
Built-in compiler passes.
Raw PHP in {php ...}
Extension for translations.
Common interface for all Latte exceptions.
Latte extension.
Latte helpers.
Template loader.
Loads templates from filesystem.
Loads templates from strings or an in-memory array.
Security policy for sandbox mode.
Template rendering failed.
Caching of compiled templates.
Filter executor.
Content type context for contextual filters.
Functions executor.
Template runtime helpers.
Wraps a pre-escaped HTML string so it is not escaped again when rendered.
Runtime utilities for handling HTML.
Marks a value as pre-escaped HTML that should not be escaped again when rendered.
Base class for compiled templates.
Runtime utilities for handling XML.
Function call routed through sandbox security policy.
Method call routed through sandbox security policy.
Property access routed through sandbox security policy.
{sandbox 'file.latte'} Isolated template rendering with sandbox policy.
Static method call routed through sandbox security policy.
Static property access routed through sandbox security policy.
Security protection for the sandbox.
Default-deny security policy. Allowlist permitted tags, filters, functions, methods, and properties.
Template uses forbidden function, filter or variable in sandbox mode.
Template file not found or could not be loaded.
Validates Latte template syntax.
Linter extension for validating filters, functions, classes, methods, constants and more.