Class: WindViewerResolver
Source Location: /viewer/resolver/WindViewerResolver.php
Class WindViewerResolver
Class Overview
Implements interfaces:
视图渲染器引擎
该类实现了接口IWindViewerResolver,主要职责是进行视图渲染,并返回渲染的视图内容. 支持布局管理,主题管理以及通过WindViewTemplate支持视图模板编译。 组件定义: 'viewResolver' => array(
'path' => 'WIND:viewer.WindViewerResolver',
'scope' => 'prototype',
'properties' => array(
'windLayout' => array(
'ref' => 'layout',
)))
<note>注意:框架默认视图渲染引擎组件,可以通过覆盖component相关配置进行修改</note> <note>WindView和WindViewerResolver是相互配合使用的,等WindView接受一个视图渲染请求后会初始化一个ViewerResolver对象并将进一步的视图渲染工作移交给该对象. 而ViewerResolver对象在进行视图渲染时的状态信息,模板信息,以及配置信息都来自于WindView对象.ViewerResolver对象中的WindView对象必须是创建ViewerResolver的那个对象. 我们可以通过修改view的component配置来注入不同的ViewerResolver实现. </note>
Located in /viewer/resolver/WindViewerResolver.php [line 29]
WindModule
|
--WindNormalViewerResolver
|
--WindViewerResolver
Author(s):
Information Tags:
Version: | $Id: WindViewerResolver.php 3269 2011-12-21 06:16:00Z yishuo $ |
Copyright: | ©2003-2103 phpwind.com |
License: | http://www.windframework.com |
|
Methods
|
Inherited Properties, Constants, and Methods
Method Summary
array(compileFile,content) |
compile() |
编译模板并返回编译后模板地址及内容 |
Methods
array(compileFile,content) compile(
string
$template, [string
$suffix = ''], [boolean
$readOnly = false], [boolean
$forceOutput = false]
)
|
|
编译模板并返回编译后模板地址及内容
$output==true返回编译文件绝对路径地址和内容,不生成编译文件;
$output==false返回编译文件绝对路径地址和内容,生成编译文件
Parameters:
string |
$template: |
模板名称 必填 |
string |
$suffix: |
模板后缀 默认为空 |
boolean |
$readOnly: |
是否直接输出模板内容,接受两个值true,false 默认值为false |
boolean |
$forceOutput: |
是否强制返回模板内容,默认为不强制 |
API Tags:
Return: | compileFile模板编译文件绝对地址,
content编译后模板输出内容,当$output
为false时将content写入compileFile |
Access: | public |
|
|