PHP 클래스 think\view\driver\Php

파일 보기 프로젝트 열기: top-think/framework

보호된 프로퍼티들

프로퍼티 타입 설명
$config 模板引擎参数

공개 메소드들

메소드 설명
__construct ( $config = [] )
config ( string | array $name, mixed $value = null ) : void 配置模板引擎
display ( string $content, array $data = [] ) : void 渲染模板内容
exists ( string $template ) : boolean 检测是否存在模板文件
fetch ( string $template, array $data = [] ) : void 渲染模板文件

비공개 메소드들

메소드 설명
parseTemplate ( string $template ) : string 自动定位模板文件

메소드 상세

__construct() 공개 메소드

public __construct ( $config = [] )

config() 공개 메소드

配置模板引擎
public config ( string | array $name, mixed $value = null ) : void
$name string | array 参数名
$value mixed 参数值
리턴 void

display() 공개 메소드

渲染模板内容
public display ( string $content, array $data = [] ) : void
$content string 模板内容
$data array 模板变量
리턴 void

exists() 공개 메소드

检测是否存在模板文件
public exists ( string $template ) : boolean
$template string 模板文件或者模板规则
리턴 boolean

fetch() 공개 메소드

渲染模板文件
public fetch ( string $template, array $data = [] ) : void
$template string 模板文件
$data array 模板变量
리턴 void

프로퍼티 상세

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

模板引擎参数
protected $config