类 MissingTemplateException
当找不到模板文件时使用。
命名空间: Cake\View\Exception
属性摘要
-
$_attributes protected
数组从构造函数传递进来并可在显示开发错误时在视图中使用的属性数组。
-
$_defaultCode protected
整数默认异常代码
-
$_messageTemplate protected
字符串包含已使用 attributes sprintf() 格式化的属性的模板字符串。
-
$filename protected
字符串 -
$paths protected
list<string> -
$templateName protected
字符串|null -
$type protected
字符串
方法摘要
-
__construct() public
构造函数
-
formatMessage() public
获取格式化的异常消息。
-
getAttributes() public
获取传递进来的属性
方法详情
__construct() ¶ public
__construct(list<string>|string $file, list<string> $paths = [], int|null $code = null, Throwable|null $previous = null)
构造函数
参数
-
list<string>|string$file 文件名作为字符串,或为了向后兼容而使用数组。
-
list<string>$paths 可选 找不到模板的路径列表。
-
int|null$code 可选 错误代码。
-
Throwable|null$previous 可选 之前的异常。