PHP 클래스 LightnCandy\Partial

파일 보기 프로젝트 열기: zordius/lightncandy 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$TMP_JS_FUNCTION_STR

공개 메소드들

메소드 설명
compile ( array\arraystring | integer> &$context, string $template ) : string compile a template into a closure function
compileDynamic ( array\arraystring | integer> &$context, string $name ) : string | null compile partial as closure, stored in context
compileStatic ( array\arraystring | integer> &$context, string $name ) : string | null compile a partial to static embed PHP code
handleDynamic ( &$context ) Include all partials when using dynamic partials
read ( array\arraystring | integer> &$context, string $name ) : string | null Read partial file content as string and store in context
resolve ( array\arraystring | integer> &$context, string &$name ) : string | null resolve partial, return the partial content
resolver ( array\arraystring | integer> &$context, string &$name ) : string | null use partialresolver to resolve partial, return the partial content

보호된 메소드들

메소드 설명
prePartial ( array\arraystring | integer> &$context, string $tmpl, string &$name ) : string | null preprocess partial template before it be stored into context

메소드 상세

compile() 공개 정적인 메소드

compile a template into a closure function
public static compile ( array\arraystring | integer> &$context, string $template ) : string
$context array\arraystring | integer>
$template string template string
리턴 string $code compiled PHP code

compileDynamic() 공개 정적인 메소드

compile partial as closure, stored in context
public static compileDynamic ( array\arraystring | integer> &$context, string $name ) : string | null
$context array\arraystring | integer>
$name string partial name
리턴 string | null $code compiled PHP code when success

compileStatic() 공개 정적인 메소드

compile a partial to static embed PHP code
public static compileStatic ( array\arraystring | integer> &$context, string $name ) : string | null
$context array\arraystring | integer>
$name string partial name
리턴 string | null $code PHP code string

handleDynamic() 공개 정적인 메소드

Include all partials when using dynamic partials
public static handleDynamic ( &$context )

prePartial() 보호된 정적인 메소드

preprocess partial template before it be stored into context
protected static prePartial ( array\arraystring | integer> &$context, string $tmpl, string &$name ) : string | null
$context array\arraystring | integer>
$tmpl string partial template
$name string partial name
리턴 string | null $content processed partial template

read() 공개 정적인 메소드

Read partial file content as string and store in context
public static read ( array\arraystring | integer> &$context, string $name ) : string | null
$context array\arraystring | integer>
$name string partial name
리턴 string | null $code compiled PHP code when success

resolve() 공개 정적인 메소드

resolve partial, return the partial content
public static resolve ( array\arraystring | integer> &$context, string &$name ) : string | null
$context array\arraystring | integer>
$name string partial name
리턴 string | null $content partial content

resolver() 공개 정적인 메소드

use partialresolver to resolve partial, return the partial content
public static resolver ( array\arraystring | integer> &$context, string &$name ) : string | null
$context array\arraystring | integer>
$name string partial name
리턴 string | null $content partial content

프로퍼티 상세

$TMP_JS_FUNCTION_STR 공개적으로 정적으로 프로퍼티

public static $TMP_JS_FUNCTION_STR