A

Dedent::apply() — Method in class Dedent
AreaNodeClass in namespace Latte\Compiler\Nodes

Base for nodes representing template content that produces output.

AuxiliaryNodeClass in namespace Latte\Compiler\Nodes

Code generator hidden from compiler passes. Pass child nodes for traversal.

FragmentNode::append() — Method in class FragmentNode

Appends a node. FragmentNode children are merged inline; NopNodes are discarded.

AttributeNodeClass in namespace Latte\Compiler\Nodes\Html

HTML attribute with name, optional value, and quote style.

$ ElementNode#attributesProperty in class ElementNode
ArgumentNodeClass in namespace Latte\Compiler\Nodes\Php

Function/method argument with optional name, reference, and unpacking.

ArrayItemNodeClass in namespace Latte\Compiler\Nodes\Php

Array item with optional key, reference, and spread operator.

ArrayAccessNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Array or string element access ($arr[$key]).

ArrayNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Array literal.

AssignNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Assignment ($var = expr or $var = &$ref).

AssignOpNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Compound assignment ($var += expr, $var .= expr, etc.).

AuxiliaryNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Code generator hidden from compiler passes. Pass child nodes for traversal.

Position::advance() — Method in class Position

Returns a new position advanced by the length of the given string.

PrintContext::addBlock() — Method in class PrintContext
PrintContext::argumentsAsArray() — Method in class PrintContext

Converts a list of argument nodes to a PHP array literal string.

TemplateGenerator::addMethod() — Method in class TemplateGenerator

Adds custom method to template.

TemplateGenerator::addProperty() — Method in class TemplateGenerator

Adds custom property to template.

TemplateGenerator::addConstant() — Method in class TemplateGenerator

Adds custom constant to template.

TemplateParser::addTags() — Method in class TemplateParser
Engine::applyPasses() — Method in class Engine

Runs all registered compiler passes over the AST.

Engine::addFilter() — Method in class Engine

Registers run-time filter.

Engine::addFilterLoader() — Method in class Engine
Engine::addExtension() — Method in class Engine

Adds new extension.

Engine::addFunction() — Method in class Engine

Registers run-time function.

Engine::addProvider() — Method in class Engine

Adds new provider.

Engine::addDefaultExtensions() — Method in class Engine
AuxiliaryIteratorClass in namespace Latte\Essential

Iterates over key-value pairs.

Blueprint::addProperties() — Method in class Blueprint
Blueprint::addFunctions() — Method in class Blueprint
$ EmbedNode#argsProperty in class EmbedNode
$ ImportNode#argsProperty in class ImportNode
$ IncludeBlockNode#argsProperty in class IncludeBlockNode
$ IncludeFileNode#argsProperty in class IncludeFileNode
$ NAttrNode#argsProperty in class NAttrNode
NAttrNode::attrs() — Method in class NAttrNode
$ NClassNode#argsProperty in class NClassNode
$ VarNode#assignmentsProperty in class VarNode
$ VarPrintNode#allProperty in class VarPrintNode
$ Cache#autoRefreshProperty in class Cache
FilterExecutor::add() — Method in class FilterExecutor

Registers run-time filter.

FunctionExecutor::add() — Method in class FunctionExecutor

Registers run-time function.

Template::addBlock() — Method in class Template

Creates block if doesn't exist and checks if content type is the same.

$ SandboxNode#argsProperty in class SandboxNode
RuntimeChecker::args() — Method in class RuntimeChecker

Validates that no array argument is a disallowed callable and returns the arguments.

SecurityPolicy::allowTags() — Method in class SecurityPolicy
SecurityPolicy::allowFilters() — Method in class SecurityPolicy
SecurityPolicy::allowFunctions() — Method in class SecurityPolicy
SecurityPolicy::allowMethods() — Method in class SecurityPolicy

Adds methods of the given class (or its subclasses) to the allowlist.

SecurityPolicy::allowProperties() — Method in class SecurityPolicy

Adds properties of the given class (or its subclasses) to the allowlist.

B

BlueScreenPanelClass in namespace Latte\Bridges\Tracy

BlueScreen panels for Tracy 2.x

LattePanel::beforeRender() — Method in class LattePanel
TracyExtension::beforeRender() — Method in class TracyExtension

Initializes before template is rendered.

BlockClass in namespace Latte\Compiler
BogusTagNodeClass in namespace Latte\Compiler\Nodes\Html

DOCTYPE or bogus HTML tags.

$ ElementNode#breakableProperty in class ElementNode
BinaryOpNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Binary operation: arithmetic, logical, bitwise, comparison, null-coalescing, or pipe.

BooleanNodeClass in namespace Latte\Compiler\Nodes\Php\Scalar

Boolean literal (true/false).

$ PrintContext#blocksProperty in class PrintContext
PrintContext::beginEscape() — Method in class PrintContext

Saves the current escaping context and returns it. Call restoreEscape() to revert.

TemplateGenerator::buildClass() — Method in class TemplateGenerator

Builds template class.

$ TemplateParser#blocksProperty in class TemplateParser
$ TemplateParser#blockLayerProperty in class TemplateParser
BlueprintClass in namespace Latte\Essential

Generates blueprint of template class.

CoreExtension::beforeCompile() — Method in class CoreExtension

Initializes before template is compiled.

CoreExtension::beforeRender() — Method in class CoreExtension

Initializes before template is rendered.

Filters::bytes() — Method in class Filters

Converts to human-readable file size.

Filters::breaklines() — Method in class Filters

Converts newlines to HTML
tags.

Filters::batch() — Method in class Filters

Chunks items by returning an array of arrays with the given number of items.

BlockNodeClass in namespace Latte\Essential\Nodes

{block [local] name} ... {/block} {block|filter} ... {/block} (anonymous filter block)

$ BlockNode#blockProperty in class BlockNode
$ DefineNode#blockProperty in class DefineNode
$ EmbedNode#blocksProperty in class EmbedNode
$ ForeachNode#byRefProperty in class ForeachNode
$ IncludeBlockNode#blocksProperty in class IncludeBlockNode
Extension::beforeCompile() — Method in class Extension

Initializes before template is compiled.

Extension::beforeRender() — Method in class Extension

Initializes before template is rendered.

$ FileLoader#baseDirProperty in class FileLoader
BlockClass in namespace Latte\Runtime
$ Template#blocksProperty in class Template
SandboxExtension::beforeCompile() — Method in class SandboxExtension

Initializes before template is compiled.

SandboxExtension::beforeRender() — Method in class SandboxExtension

Initializes before template is rendered.

LinterExtension::beforeCompile() — Method in class LinterExtension

Initializes before template is compiled.

C

CompileExceptionClass in namespace Latte

Template compilation failed.

$ Block#contentProperty in class Block
NodeHelpers::clone() — Method in class NodeHelpers

Creates a deep clone of the node tree.

$ FragmentNode#childrenProperty in class FragmentNode
CommentNodeClass in namespace Latte\Compiler\Nodes\Html

HTML comment ().

$ ElementNode#contentProperty in class ElementNode
ClosureUseNodeClass in namespace Latte\Compiler\Nodes\Php

Closure use variable ($var or &$var).

ComplexTypeNodeClass in namespace Latte\Compiler\Nodes\Php

Base for complex type declarations (nullable, union, intersection).

CastNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Type cast (int), (string), (array), etc.

ClassConstantFetchNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Class constant access (Foo::CONST or Foo::class).

CloneNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Object cloning (clone $obj).

ClosureNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Closure or arrow function (fn($x) => $x or function($x) use ($y) {}).

ConstantFetchNodeClass in namespace Latte\Compiler\Nodes\Php\Expression

Global constant access (CONST or \CONST).

$ ModifierNode#checkProperty in class ModifierNode
PrintNode::create() — Method in class PrintNode
$ TemplateNode#contentTypeProperty in class TemplateNode
PhpHelpers::checkCode() — Method in class PhpHelpers

Validates the generated PHP code using the given PHP binary as a linter.

PrintContext::callExpr() — Method in class PrintContext

Wraps the LHS of a call in parentheses if needed.

Tag::closestTag() — Method in class Tag

Finds the nearest ancestor tag whose node is an instance of one of the given classes, optionally filtered by a condition. Returns null if none is found.

TagParser::convertArrayToList() — Method in class TagParser
TemplateParser::consumeTag() — Method in class TemplateParser

Consumes all PHP tokens of the current tag body and returns them.

TemplateParser::checkBlockIsUnique() — Method in class TemplateParser

Validates that the block name is valid and not already declared, then registers it.

TokenStream::consume() — Method in class TokenStream

Consumes the current token (if is of given kind) or throws exception on end.

ContentTypeClass in namespace Latte

Content type constants for context-aware escaping.

Engine::createTemplate() — Method in class Engine

Creates template object.

Engine::compile() — Method in class Engine

Compiles template to PHP code.

AuxiliaryIterator::count() — Method in class AuxiliaryIterator
Blueprint::clickableFile() — Method in class Blueprint
CachingIteratorClass in namespace Latte\Essential

Smarter caching iterator.

$ CachingIterator#counterProperty in class CachingIterator
$ CachingIterator#counter0Property in class CachingIterator
CachingIterator::count() — Method in class CachingIterator
CoreExtensionClass in namespace Latte\Essential

Basic tags and filters for Latte.

Filters::commas() — Method in class Filters

Join array elements with a comma and space.

Filters::capitalize() — Method in class Filters

Capitalize string.

Filters::column() — Method in class Filters

Returns the values from a single column in the input array.

Filters::clamp() — Method in class Filters

Returns value clamped to the inclusive range of min and max.

Filters::ceil() — Method in class Filters

Rounds number up to specified precision.

Filters::checkUrl() — Method in class Filters

Sanitizes string for use inside href attribute.

$ BlockNode#contentProperty in class BlockNode
BlockNode::create() — Method in class BlockNode
CaptureNodeClass in namespace Latte\Essential\Nodes

{capture $var} ... {/capture} Captures block output into variable.

$ CaptureNode#contentProperty in class CaptureNode
CaptureNode::create() — Method in class CaptureNode
ContentTypeNodeClass in namespace Latte\Essential\Nodes

{contentType html|xml|js|css|text|...} Switches escaping mode and optionally sends HTTP header.

$ ContentTypeNode#contentTypeProperty in class ContentTypeNode
ContentTypeNode::create() — Method in class ContentTypeNode
CustomFunctionCallNodeClass in namespace Latte\Essential\Nodes

Wrapper for custom function calls in Latte expressions.

$ DebugbreakNode#conditionProperty in class DebugbreakNode
DebugbreakNode::create() — Method in class DebugbreakNode
$ DefineNode#contentProperty in class DefineNode
DefineNode::create() — Method in class DefineNode
DoNode::create() — Method in class DoNode
DumpNode::create() — Method in class DumpNode
EmbedNode::create() — Method in class EmbedNode
ExtendsNode::create() — Method in class ExtendsNode
FirstLastSepNode::create() — Method in class FirstLastSepNode
$ ForNode#conditionProperty in class ForNode
$ ForNode#contentProperty in class ForNode
ForNode::create() — Method in class ForNode
$ ForeachNode#contentProperty in class ForeachNode
$ ForeachNode#checkArgsProperty in class ForeachNode
ForeachNode::create() — Method in class ForeachNode
$ IfChangedNode#conditionsProperty in class IfChangedNode
IfChangedNode::create() — Method in class IfChangedNode
$ IfContentNode#contentProperty in class IfContentNode
IfContentNode::create() — Method in class IfContentNode
$ IfNode#conditionProperty in class IfNode
$ IfNode#captureProperty in class IfNode
IfNode::create() — Method in class IfNode
ImportNode::create() — Method in class ImportNode
IncludeBlockNode::create() — Method in class IncludeBlockNode
IncludeFileNode::create() — Method in class IncludeFileNode
$ IterateWhileNode#conditionProperty in class IterateWhileNode
$ IterateWhileNode#contentProperty in class IterateWhileNode
IterateWhileNode::create() — Method in class IterateWhileNode
$ JumpNode#conditionProperty in class JumpNode
JumpNode::create() — Method in class JumpNode
NAttrNode::create() — Method in class NAttrNode
NClassNode::create() — Method in class NClassNode
$ NElseNode#contentProperty in class NElseNode
$ NElseNode#conditionProperty in class NElseNode
NElseNode::create() — Method in class NElseNode
NTagNode::create() — Method in class NTagNode
ParametersNode::create() — Method in class ParametersNode
$ RawPhpNode#codeProperty in class RawPhpNode
RawPhpNode::create() — Method in class RawPhpNode
RollbackNode::create() — Method in class RollbackNode
$ SpacelessNode#contentProperty in class SpacelessNode
SpacelessNode::create() — Method in class SpacelessNode
$ SwitchNode#casesProperty in class SwitchNode
SwitchNode::create() — Method in class SwitchNode
TemplatePrintNode::create() — Method in class TemplatePrintNode
TemplateTypeNode::create() — Method in class TemplateTypeNode
TraceNode::create() — Method in class TraceNode
$ TranslateNode#contentProperty in class TranslateNode
TranslateNode::create() — Method in class TranslateNode
TryNode::create() — Method in class TryNode
VarNode::create() — Method in class VarNode
VarPrintNode::create() — Method in class VarPrintNode
VarTypeNode::create() — Method in class VarTypeNode
$ WhileNode#conditionProperty in class WhileNode
$ WhileNode#contentProperty in class WhileNode
WhileNode::create() — Method in class WhileNode
Passes::customFunctionsPass() — Method in class Passes

Replaces calls to registered functions with CustomFunctionCallNode wrappers.

Passes::checkUrlsPass() — Method in class Passes

Validates and secures potentially dangerous URLs attributes in HTML elements.

$ Block#contentTypeProperty in class Block
CacheClass in namespace Latte\Runtime

Caching of compiled templates.

Helpers::convertTo() — Method in class Helpers

Converts content between content types.

HtmlHelpers::convertJSToRawText() — Method in class HtmlHelpers

Converts JS and CSS for usage in