Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • Compiler
  • Engine
  • HtmlNode
  • MacroNode
  • MacroTokens
  • Parser
  • PhpWriter
  • Token

Interfaces

  • ILoader
  • IMacro

Traits

  • Strict

Exceptions

  • CompileException
  • RegexpException
  • RuntimeException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Compiler

Latte compiler.

Latte\Compiler uses Latte\Strict
Namespace: Latte
Located at Latte/Compiler/Compiler.php
Methods summary
public Latte\Compiler
# addMacro( string $name, Latte\IMacro $macro, $flags = null )

Adds new macro with IMacro flags.

Adds new macro with IMacro flags.

Parameters

$name
$macro
$flags

Returns

Latte\Compiler
static
public string
# compile( array $tokens, $className )

Compiles tokens to PHP code.

Compiles tokens to PHP code.

Parameters

$tokens
$className

Returns

string
string
public Latte\Compiler
# setContentType( $type )

Returns

Latte\Compiler
static
public
# getContentType( )

Deprecated

public
# getContext( )

Deprecated

public Latte\MacroNode|null
# getMacroNode( )

Returns

Latte\MacroNode|null
MacroNode|null
public integer|null
# getLine( )

Returns current line number.

Returns current line number.

Returns

integer|null
int|null
public boolean
# isInHead( )

Returns

boolean
bool
Methods used from Latte\Strict
__call(), __callStatic(), __get(), __isset(), __set(), __unset()
Constants summary
string CONTENT_HTML

Context-aware escaping content types

Context-aware escaping content types

#Latte\Engine::CONTENT_HTML
string CONTENT_XHTML

Context-aware escaping content types

Context-aware escaping content types

#Latte\Engine::CONTENT_XHTML
string CONTENT_XML

Context-aware escaping content types

Context-aware escaping content types

#Latte\Engine::CONTENT_XML
string CONTENT_JS

Context-aware escaping content types

Context-aware escaping content types

#Latte\Engine::CONTENT_JS
string CONTENT_CSS

Context-aware escaping content types

Context-aware escaping content types

#Latte\Engine::CONTENT_CSS
string CONTENT_ICAL

Context-aware escaping content types

Context-aware escaping content types

#Latte\Engine::CONTENT_ICAL
string CONTENT_TEXT

Context-aware escaping content types

Context-aware escaping content types

#Latte\Engine::CONTENT_TEXT
CONTEXT_HTML_TEXT
#null
string CONTEXT_HTML_TAG
#'Tag'
string CONTEXT_HTML_ATTRIBUTE
#'Attr'
string CONTEXT_HTML_ATTRIBUTE_JS
#'AttrJs'
string CONTEXT_HTML_ATTRIBUTE_CSS
#'AttrCss'
string CONTEXT_HTML_ATTRIBUTE_URL
#'AttrUrl'
string CONTEXT_HTML_ATTRIBUTE_UNQUOTED_URL
#'AttrUnquotedUrl'
string CONTEXT_HTML_COMMENT
#'Comment'
string CONTEXT_HTML_BOGUS_COMMENT
#'Bogus'
string CONTEXT_HTML_CSS
#'Css'
string CONTEXT_HTML_JS
#'Js'
CONTEXT_XML_TEXT
#Latte\Compiler::CONTEXT_HTML_TEXT
string CONTEXT_XML_TAG
#Latte\Compiler::CONTEXT_HTML_TAG
string CONTEXT_XML_ATTRIBUTE
#Latte\Compiler::CONTEXT_HTML_ATTRIBUTE
string CONTEXT_XML_COMMENT
#Latte\Compiler::CONTEXT_HTML_COMMENT
string CONTEXT_XML_BOGUS_COMMENT
#Latte\Compiler::CONTEXT_HTML_BOGUS_COMMENT
Nette 2.4-20170829 API API documentation generated by ApiGen 2.8.0