PHP 클래스 Latte\Compiler

상속: extends latte\Object
파일 보기 프로젝트 열기: nette/latte 1 사용 예제들

공개 메소드들

메소드 설명
addMacro ( $name, latte\IMacro $macro, $flags = NULL ) : static Adds new macro with IMacro flags.
addMethod ( $name, $body, $arguments = '' ) : void Adds custom method to template.
addProperty ( $name, $value ) : void Adds custom property to template.
closeMacro ( $name, $args = NULL, $modifiers = NULL, $isRightmost = FALSE, $nPrefix = NULL ) : MacroNode Generates code for {/macro .
compile ( array $tokens, $className ) : string Compiles tokens to PHP code.
expandMacro ( $name, $args, $modifiers = NULL, $nPrefix = NULL ) : MacroNode Expands macro and returns node & code.
expandTokens ( $s )
getContentType ( )
getContext ( )
getLine ( ) : integer Returns current line number.
getMacroNode ( ) : MacroNode | null
getMethods ( ) : array Returns custom methods.
getProperties ( ) : array Returns custom properites.
isInHead ( ) : boolean
openMacro ( $name, $args = NULL, $modifiers = NULL, $isRightmost = FALSE, $nPrefix = NULL ) : MacroNode Generates code for {macro .
setContentType ( $type ) : static
setContext ( $context )
writeAttrsMacro ( $html ) : void Generates code for macro to the output.

비공개 메소드들

메소드 설명
escape ( $s )
printEndTag ( $node )
processComment ( latte\Token $token )
processHtmlAttributeBegin ( latte\Token $token )
processHtmlAttributeEnd ( latte\Token $token )
processHtmlTagBegin ( latte\Token $token )
processHtmlTagEnd ( latte\Token $token )
processMacroTag ( latte\Token $token )
processText ( latte\Token $token )
writeCode ( $code, $isReplaced, $isRightmost )

메소드 상세

addMacro() 공개 메소드

Adds new macro with IMacro flags.
public addMacro ( $name, latte\IMacro $macro, $flags = NULL ) : static
$macro latte\IMacro
리턴 static

addMethod() 공개 메소드

Adds custom method to template.
public addMethod ( $name, $body, $arguments = '' ) : void
리턴 void

addProperty() 공개 메소드

Adds custom property to template.
public addProperty ( $name, $value ) : void
리턴 void

closeMacro() 공개 메소드

..} to the output.
public closeMacro ( $name, $args = NULL, $modifiers = NULL, $isRightmost = FALSE, $nPrefix = NULL ) : MacroNode
리턴 MacroNode

compile() 공개 메소드

Compiles tokens to PHP code.
public compile ( array $tokens, $className ) : string
$tokens array
리턴 string

expandMacro() 공개 메소드

Expands macro and returns node & code.
public expandMacro ( $name, $args, $modifiers = NULL, $nPrefix = NULL ) : MacroNode
리턴 MacroNode

expandTokens() 공개 메소드

public expandTokens ( $s )

getContentType() 공개 메소드

사용 중단:
public getContentType ( )

getContext() 공개 메소드

사용 중단:
public getContext ( )

getLine() 공개 메소드

Returns current line number.
public getLine ( ) : integer
리턴 integer

getMacroNode() 공개 메소드

public getMacroNode ( ) : MacroNode | null
리턴 MacroNode | null

getMethods() 공개 메소드

Returns custom methods.
public getMethods ( ) : array
리턴 array

getProperties() 공개 메소드

Returns custom properites.
public getProperties ( ) : array
리턴 array

isInHead() 공개 메소드

public isInHead ( ) : boolean
리턴 boolean

openMacro() 공개 메소드

..} to the output.
public openMacro ( $name, $args = NULL, $modifiers = NULL, $isRightmost = FALSE, $nPrefix = NULL ) : MacroNode
리턴 MacroNode

setContentType() 공개 메소드

public setContentType ( $type ) : static
리턴 static

setContext() 공개 메소드

public setContext ( $context )

writeAttrsMacro() 공개 메소드

Generates code for macro to the output.
public writeAttrsMacro ( $html ) : void
리턴 void