\think\facadeView

Summary

Methods
Properties
Constants
bind()
instance()
make()
__callStatic()
init()
share()
assign()
config()
exists()
filter()
engine()
fetch()
display()
No public properties found
No constants found
createFacade()
getFacadeClass()
$bind
$alwaysNewInstance
N/A
No private methods found
No private properties found
N/A

Properties

$bind

$bind : array

绑定对象

Type

array

$alwaysNewInstance

$alwaysNewInstance : bool

始终创建新的对象实例

Type

bool

Methods

bind()

bind(string|array  $name, string  $class = null) : object

绑定类的静态代理

Parameters

string|array $name

类标识

string $class

类名

Returns

object —

instance()

instance(mixed  ...$args) : mixed

带参数实例化当前Facade类

Parameters

mixed $args variadic

Returns

mixed —

make()

make(string  $class, array|true  $args = [], bool  $newInstance = false) : mixed

调用类的实例

Parameters

string $class

类名或者标识

array|true $args

变量

bool $newInstance

是否每次创建新的实例

Returns

mixed —

__callStatic()

__callStatic(mixed  $method, mixed  $params) : mixed

Parameters

mixed $method
mixed $params

Returns

mixed —

init()

init(mixed  $engine = [], array  $replace = []) : \think\View

static 初始化

Parameters

mixed $engine = []
array $replace = []

Returns

\think\View —

share()

share(mixed  $name, mixed  $value = '') : \think\View

static 模板变量静态赋值

Parameters

mixed $name
mixed $value = ''

Returns

\think\View —

assign()

assign(mixed  $name, mixed  $value = '') : \think\View

static 模板变量赋值

Parameters

mixed $name
mixed $value = ''

Returns

\think\View —

config()

config(mixed  $name, mixed  $value = '') : \think\View

static 配置模板引擎

Parameters

mixed $name
mixed $value = ''

Returns

\think\View —

exists()

exists(mixed  $name) : \think\View

static 检查模板是否存在

Parameters

mixed $name

Returns

\think\View —

filter()

filter(callable  $filter) : \think\View

static 视图内容过滤

Parameters

callable $filter

Returns

\think\View —

engine()

engine(mixed  $engine = []) : \think\View

static 设置当前模板解析的引擎

Parameters

mixed $engine = []

Returns

\think\View —

fetch()

fetch(string  $template = '', array  $vars = [], array  $config = [], bool  $renderContent = false) : string

static 解析和获取模板内容

Parameters

string $template = ''
array $vars = []
array $config = []
bool $renderContent = false

Returns

string —

display()

display(string  $content = '', array  $vars = [], array  $config = []) : string

static 渲染内容输出

Parameters

string $content = ''
array $vars = []
array $config = []

Returns

string —

createFacade()

createFacade(string  $class = '', array  $args = [], bool  $newInstance = false) : object

创建Facade实例

Parameters

string $class

类名或标识

array $args

变量

bool $newInstance

是否每次创建新的实例

Returns

object —

getFacadeClass()

getFacadeClass() : string

获取当前Facade对应类名(或者已经绑定的容器对象标识)

Returns

string —