Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

Interfaces

Exceptions

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class LatteCompiler

Latte compiler.

Object
Extended by LatteCompiler
Package: Nette\Latte
Author: David Grudl
Located at Latte/Compiler.php
Methods summary
public
# __construct( )
public LatteCompiler
# addMacro( string $name, IMacro $macro )

Adds new macro.

Adds new macro.

Parameters

$name
string
$macro

Returns

LatteCompiler
public string
# compile( array $tokens )

Compiles tokens to PHP code.

Compiles tokens to PHP code.

Parameters

$tokens
LatteToken[]

Returns

string
public LatteCompiler
# setContentType( $type )

Returns

LatteCompiler
public string
# getContentType( )

Returns

string
public LatteCompiler
# setContext( $context, $sub = NULL )

Returns

LatteCompiler
public array
# getContext( )

Returns

array
[context, subcontext]
public string
# getTemplateId( )

Returns

string
public integer
# getLine( )

Returns current line number.

Returns current line number.

Returns

integer
public
# expandTokens( $s )
public MacroNode
# writeMacro( string $name, string $args = NULL, string $modifiers = NULL, boolean $isRightmost = FALSE, HtmlNode $htmlNode = NULL, $prefix = NULL )

Generates code for {macro ...} to the output.

Generates code for {macro ...} to the output.

Parameters

$name
string
$args
string
$modifiers
string
$isRightmost
boolean
$htmlNode
$prefix

Returns

MacroNode
public
# writeAttrsMacro( string $code, HtmlNode $htmlNode )

Generates code for macro <tag n:attr> to the output.

Generates code for macro <tag n:attr> to the output.

Parameters

$code
string
$htmlNode
public MacroNode
# expandMacro( string $name, string $args, string $modifiers = NULL, HtmlNode $htmlNode = NULL, $prefix = NULL )

Expands macro and returns node & code.

Expands macro and returns node & code.

Parameters

$name
string
$args
string
$modifiers
string
$htmlNode
$prefix

Returns

MacroNode
Methods inherited from Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
string CONTENT_HTML 'html'
#

Context-aware escaping content types

Context-aware escaping content types

string CONTENT_XHTML 'xhtml'
#

Context-aware escaping content types

Context-aware escaping content types

string CONTENT_XML 'xml'
#

Context-aware escaping content types

Context-aware escaping content types

string CONTENT_JS 'js'
#

Context-aware escaping content types

Context-aware escaping content types

string CONTENT_CSS 'css'
#

Context-aware escaping content types

Context-aware escaping content types

string CONTENT_ICAL 'ical'
#

Context-aware escaping content types

Context-aware escaping content types

string CONTENT_TEXT 'text'
#

Context-aware escaping content types

Context-aware escaping content types

string CONTEXT_COMMENT 'comment'
#
string CONTEXT_SINGLE_QUOTED "'"
#
string CONTEXT_DOUBLE_QUOTED '"'
#
Properties summary
public string $defaultContentType LatteCompiler::CONTENT_XHTML
#

default content type

default content type

Magic properties inherited from Object
$reflection
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0