Packages

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

Classes

  • NLatteCompiler
  • NLatteFilter
  • NLatteToken
  • NMacroNode
  • NMacroTokenizer
  • NParser
  • NPhpWriter

Interfaces

  • IMacro

Exceptions

  • NLatteException
  • Overview
  • Package
  • Class
  • Tree

Class NLatteCompiler

Latte compiler.

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

Adds new macro.

Adds new macro.

Parameters

$name
$macro

Returns

NLatteCompiler
provides a fluent interface
public string
# compile( array $tokens )

Compiles tokens to PHP code.

Compiles tokens to PHP code.

Parameters

$tokens
array

Returns

string
public NLatteCompiler
# setContentType( $type )

Returns

NLatteCompiler
provides a fluent interface
public string
# getContentType( )

Returns

string
public array
# getContext( )

Returns

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

Returns

string
public integer
# getLine( )

Returns current line number.

Returns current line number.

Returns

integer
public
# writeMacro( string $name, string $args = NULL, string $modifiers = NULL, boolean $isRightmost = FALSE )

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

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

Parameters

$name
string
$args
string
$modifiers
string
$isRightmost
boolean
public
# writeAttrsMacro( string $code, NHtmlNode $node )

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

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

Parameters

$code
string
$node
array
public array(MacroNode,
# expandMacro( string $name, string $args, string $modifiers = NULL, NHtmlNode $htmlNode = NULL )

Expands macro and returns node & code.

Expands macro and returns node & code.

Parameters

$name
string
$args
string
$modifiers
string
$htmlNode

Returns

array(MacroNode,
string)
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
string CONTENT_HTML 'html'
#
string CONTENT_XHTML 'xhtml'
#
string CONTENT_XML 'xml'
#
string CONTENT_JS 'js'
#
string CONTENT_CSS 'css'
#
string CONTENT_ICAL 'ical'
#
string CONTENT_TEXT 'text'
#
string CONTEXT_COMMENT 'comment'
#
string CONTEXT_SINGLE_QUOTED "'"
#
string CONTEXT_DOUBLE_QUOTED '"'
#
Properties summary
public string $defaultContentType NLatteCompiler::CONTENT_XHTML
#

default content type

default content type

Nette Framework 2.0beta2 (for PHP 5.2) API API documentation generated by ApiGen 2.3.0