PHP 클래스 Habari\RawPHPEngine

The RawPHPEngine is a subclass of the abstract TemplateEngine class which is intended for those theme designers who choose to use raw PHP to design theme templates.
상속: extends TemplateEngine
파일 보기 프로젝트 열기: habari/system

보호된 프로퍼티들

프로퍼티 타입 설명
$available_templates
$engine_vars Internal data to be extracted into template symbol table
$loaded_templates
$template_map
$var_stack

공개 메소드들

메소드 설명
__construct ( ) Constructor for RawPHPEngine
__get ( $key ) Tries to retrieve a variable from the internal array engine_vars.
__isset ( $key ) Detects if a variable is assigned to the template engine for use in constructing the template's output.
__set ( $key, $value ) Assigns a variable to the template engine for use in constructing the template's output.
__unset ( $key ) Unassigns a variable to the template engine.
add_template ( string $name, string $file, boolean $replace = false ) Adds and/or replaces a previously queued template in the available template listing
append ( $key, $value = '' ) Appends to an existing variable more values
assign ( $key, $value = '' ) Assigns a variable to the template engine for use in constructing the template's output.
assigned ( string $key ) Detects if a variable is assigned to the template engine for use in constructing the template's output.
clear ( ) Clear all of the assigned template variables
display ( $template ) A function which outputs the result of a transposed template to the output stream
fetch ( string $template ) A function which returns the content of the transposed template as a string
queue_dirs ( string | array $dirs ) Search directories for templates to use Templates are always taken from the first directory they're found in.
template_exists ( string $template ) Returns the existance of the specified template name

메소드 상세

__construct() 공개 메소드

Sets up default values for required settings.
public __construct ( )

__get() 공개 메소드

Method returns the value if succesful, returns false otherwise.
public __get ( $key )

__isset() 공개 메소드

Detects if a variable is assigned to the template engine for use in constructing the template's output.
public __isset ( $key )

__set() 공개 메소드

Assigns a variable to the template engine for use in constructing the template's output.
public __set ( $key, $value )

__unset() 공개 메소드

Unassigns a variable to the template engine.
public __unset ( $key )

add_template() 공개 메소드

Adds and/or replaces a previously queued template in the available template listing
public add_template ( string $name, string $file, boolean $replace = false )
$name string The name of the template
$file string The file of the template
$replace boolean

append() 공개 메소드

Appends to an existing variable more values
public append ( $key, $value = '' )

assign() 공개 메소드

Assigns a variable to the template engine for use in constructing the template's output.
public assign ( $key, $value = '' )

assigned() 공개 메소드

Detects if a variable is assigned to the template engine for use in constructing the template's output.
public assigned ( string $key )
$key string name of variable

clear() 공개 메소드

Clear all of the assigned template variables
public clear ( )

display() 공개 메소드

A function which outputs the result of a transposed template to the output stream
public display ( $template )

fetch() 공개 메소드

A function which returns the content of the transposed template as a string
public fetch ( string $template )
$template string Name of template to fetch

queue_dirs() 공개 메소드

To override this behavior, the template must be specifically added via ->add_template()
또한 보기: add_template
public queue_dirs ( string | array $dirs )
$dirs string | array A directory to look for templates in

template_exists() 공개 메소드

Returns the existance of the specified template name
public template_exists ( string $template )
$template string Name of template to detect

프로퍼티 상세

$available_templates 보호되어 있는 프로퍼티

protected $available_templates

$engine_vars 보호되어 있는 프로퍼티

Internal data to be extracted into template symbol table
protected $engine_vars

$loaded_templates 보호되어 있는 프로퍼티

protected $loaded_templates

$template_map 보호되어 있는 프로퍼티

protected $template_map

$var_stack 보호되어 있는 프로퍼티

protected $var_stack