Index
A
- Dedent::apply() — Method in class Dedent
- AreaNode — Class in namespace Latte\Compiler\Nodes
Base for nodes representing template content that produces output.
- AuxiliaryNode — Class 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.
- AttributeNode — Class in namespace Latte\Compiler\Nodes\Html
HTML attribute with name, optional value, and quote style.
- $ ElementNode#attributes — Property in class ElementNode
- ArgumentNode — Class in namespace Latte\Compiler\Nodes\Php
Function/method argument with optional name, reference, and unpacking.
- ArrayItemNode — Class in namespace Latte\Compiler\Nodes\Php
Array item with optional key, reference, and spread operator.
- ArrayAccessNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Array or string element access ($arr[$key]).
- ArrayNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Array literal.
- AssignNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Assignment ($var = expr or $var = &$ref).
- AssignOpNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Compound assignment ($var += expr, $var .= expr, etc.).
- AuxiliaryNode — Class 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
- AuxiliaryIterator — Class in namespace Latte\Essential
Iterates over key-value pairs.
- Blueprint::addProperties() — Method in class Blueprint
- Blueprint::addFunctions() — Method in class Blueprint
- $ EmbedNode#args — Property in class EmbedNode
- $ ImportNode#args — Property in class ImportNode
- $ IncludeBlockNode#args — Property in class IncludeBlockNode
- $ IncludeFileNode#args — Property in class IncludeFileNode
- $ NAttrNode#args — Property in class NAttrNode
- NAttrNode::attrs() — Method in class NAttrNode
- $ NClassNode#args — Property in class NClassNode
- $ VarNode#assignments — Property in class VarNode
- $ VarPrintNode#all — Property in class VarPrintNode
- $ Cache#autoRefresh — Property 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#args — Property 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
- BlueScreenPanel — Class 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.
- Block — Class in namespace Latte\Compiler
- BogusTagNode — Class in namespace Latte\Compiler\Nodes\Html
DOCTYPE or bogus HTML tags.
- $ ElementNode#breakable — Property in class ElementNode
- BinaryOpNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Binary operation: arithmetic, logical, bitwise, comparison, null-coalescing, or pipe.
- BooleanNode — Class in namespace Latte\Compiler\Nodes\Php\Scalar
Boolean literal (true/false).
- $ PrintContext#blocks — Property 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#blocks — Property in class TemplateParser
- $ TemplateParser#blockLayer — Property in class TemplateParser
- Blueprint — Class 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.
- BlockNode — Class in namespace Latte\Essential\Nodes
{block [local] name} ... {/block} {block|filter} ... {/block} (anonymous filter block)
- $ BlockNode#block — Property in class BlockNode
- $ DefineNode#block — Property in class DefineNode
- $ EmbedNode#blocks — Property in class EmbedNode
- $ ForeachNode#byRef — Property in class ForeachNode
- $ IncludeBlockNode#blocks — Property 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#baseDir — Property in class FileLoader
- Block — Class in namespace Latte\Runtime
- $ Template#blocks — Property 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
- CompileException — Class in namespace Latte
Template compilation failed.
- $ Block#content — Property in class Block
- NodeHelpers::clone() — Method in class NodeHelpers
Creates a deep clone of the node tree.
- $ FragmentNode#children — Property in class FragmentNode
- CommentNode — Class in namespace Latte\Compiler\Nodes\Html
HTML comment ().
- $ ElementNode#content — Property in class ElementNode
- ClosureUseNode — Class in namespace Latte\Compiler\Nodes\Php
Closure use variable ($var or &$var).
- ComplexTypeNode — Class in namespace Latte\Compiler\Nodes\Php
Base for complex type declarations (nullable, union, intersection).
- CastNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Type cast (int), (string), (array), etc.
- ClassConstantFetchNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Class constant access (Foo::CONST or Foo::class).
- CloneNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Object cloning (clone $obj).
- ClosureNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Closure or arrow function (fn($x) => $x or function($x) use ($y) {}).
- ConstantFetchNode — Class in namespace Latte\Compiler\Nodes\Php\Expression
Global constant access (CONST or \CONST).
- $ ModifierNode#check — Property in class ModifierNode
- PrintNode::create() — Method in class PrintNode
- $ TemplateNode#contentType — Property 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.
- ContentType — Class 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
- CachingIterator — Class in namespace Latte\Essential
Smarter caching iterator.
- $ CachingIterator#counter — Property in class CachingIterator
- $ CachingIterator#counter0 — Property in class CachingIterator
- CachingIterator::count() — Method in class CachingIterator
- CoreExtension — Class 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#content — Property in class BlockNode
- BlockNode::create() — Method in class BlockNode
- CaptureNode — Class in namespace Latte\Essential\Nodes
{capture $var} ... {/capture} Captures block output into variable.
- $ CaptureNode#content — Property in class CaptureNode
- CaptureNode::create() — Method in class CaptureNode
- ContentTypeNode — Class in namespace Latte\Essential\Nodes
{contentType html|xml|js|css|text|...} Switches escaping mode and optionally sends HTTP header.
- $ ContentTypeNode#contentType — Property in class ContentTypeNode
- ContentTypeNode::create() — Method in class ContentTypeNode
- CustomFunctionCallNode — Class in namespace Latte\Essential\Nodes
Wrapper for custom function calls in Latte expressions.
- $ DebugbreakNode#condition — Property in class DebugbreakNode
- DebugbreakNode::create() — Method in class DebugbreakNode
- $ DefineNode#content — Property 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#condition — Property in class ForNode
- $ ForNode#content — Property in class ForNode
- ForNode::create() — Method in class ForNode
- $ ForeachNode#content — Property in class ForeachNode
- $ ForeachNode#checkArgs — Property in class ForeachNode
- ForeachNode::create() — Method in class ForeachNode
- $ IfChangedNode#conditions — Property in class IfChangedNode
- IfChangedNode::create() — Method in class IfChangedNode
- $ IfContentNode#content — Property in class IfContentNode
- IfContentNode::create() — Method in class IfContentNode
- $ IfNode#condition — Property in class IfNode
- $ IfNode#capture — Property 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#condition — Property in class IterateWhileNode
- $ IterateWhileNode#content — Property in class IterateWhileNode
- IterateWhileNode::create() — Method in class IterateWhileNode
- $ JumpNode#condition — Property in class JumpNode
- JumpNode::create() — Method in class JumpNode
- NAttrNode::create() — Method in class NAttrNode
- NClassNode::create() — Method in class NClassNode
- $ NElseNode#content — Property in class NElseNode
- $ NElseNode#condition — Property in class NElseNode
- NElseNode::create() — Method in class NElseNode
- NTagNode::create() — Method in class NTagNode
- ParametersNode::create() — Method in class ParametersNode
- $ RawPhpNode#code — Property in class RawPhpNode
- RawPhpNode::create() — Method in class RawPhpNode
- RollbackNode::create() — Method in class RollbackNode
- $ SpacelessNode#content — Property in class SpacelessNode
- SpacelessNode::create() — Method in class SpacelessNode
- $ SwitchNode#cases — Property 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#content — Property 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#condition — Property in class WhileNode
- $ WhileNode#content — Property 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#contentType — Property in class Block
- Cache — Class 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