프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$vars | The variables that can be used by the templates. |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$initialized | Has template been initialized. | ||
$outputDirectory | string | Where should output files be written? (This is named inconsistently to be compatible w/ Texen.) | |
$templatePath | string | Look for templates here (if relative path provided). |
메소드 | 설명 | |
---|---|---|
__construct ( ) | ||
clear ( mixed $which = null ) : void | Clears one or several or all variables. | |
display ( string $__template ) : void | Low overhead (no output buffering) method to simply dump template to buffer. | |
get ( string $name ) : mixed | Gets value of specified var or NULL if var has not been put(). | |
getOutputDirectory ( ) : string | Get basepath to use for output file creation. | |
getTemplatePath ( ) : string | Get the basepath to use for template lookups. | |
parse ( string $template, string $outputFile = null, boolean $append = false ) : string | Fetches the results of a tempalte parse and either returns the string or writes results to a specified output file. | |
put ( string $name, mixed $value ) | Adds a variable to the context. | |
putAll ( array $vars, boolean $recursiveMerge = false ) : void | Merges in passed hash to vars array. | |
putCopy ( string $name, mixed $value ) | Makes a copy of the value and puts it into the context. | |
putRef ( $name, &$value ) | Put a variable into the context, assigning it by reference. | |
setOutputDirectory ( string $v ) | Set a basepath to use for output file creation. | |
setTemplatePath ( string $v ) | Set the basepath to use for template lookups. |
메소드 | 설명 | |
---|---|---|
resolvePath ( string $file, string $basepath ) : string | This returns a "best guess" path for the given file. |
public getOutputDirectory ( ) : string | ||
리턴 | string |
public getTemplatePath ( ) : string | ||
리턴 | string |
public parse ( string $template, string $outputFile = null, boolean $append = false ) : string | ||
$template | string | The template filename (relative to templatePath or absolute). |
$outputFile | string | If specified, contents of template will also be written to this file. |
$append | boolean | Should output be appended to source file? |
리턴 | string | The "parsed" template output. |
public putRef ( $name, &$value ) | ||
$name |
public setOutputDirectory ( string $v ) | ||
$v | string |
public setTemplatePath ( string $v ) | ||
$v | string |
protected string $outputDirectory | ||
리턴 | string |
protected string $templatePath | ||
리턴 | string |