##**view方法**
###*获得*
* * * * *
继承\msqphp\core\view\View对象
###*模版变量操作*
* * * * *
~~~
/**
* @param string $key 变量键
* @param miexd $value 变量值
* @param bool $cache 变量是否缓存
* @param bool $html 是否仅为html文本(及不带有html标签或需要字符转义,特殊字符什么的纯文本,避免脚本攻击)
*/
//获得
$this->get(string $key) : miexd;
//是否存在
$this->exists(string $key) : bool;
//删除
$this->delete(string $key) : void;
//设置,别名$this->assign
$this->set(string $key, $value='', bool $cache=false, bool html =false) : void;
//或者依次排列以为数组
$this->set([
'key'=>$key,
'value'=>$value,
'cache'=>bool,
'type'=>bool
]);
~~~
###*组件模版操作*
* * * * *
~~~
/**
* @param string $file_name 文件名/组件名
* @param int $expire 过期时间
* @param bool $last 是否为最终缓存
*/
//需要组件(存在取缓存,不存在进行缓存
$this->display(string $file_name, int $expire = 86400) :self;
//组件是否存在
$this->displayed(string $file_name) : bool;
//拼装
$this->assemble(string $file_name, int $expire $last = true) : self;
//展示
$this->show(string $file_name) : self;
//是否展示过
$this->showed(string $file_name) : bool;
//静态页面
$this->static(int $expire = 3600) : self;
~~~
- 序言
- 框架
- 框架获取
- 框架安装
- 应用结构
- 框架结构
- 应用目录结构
- 框架流程
- 命名规范
- 核心思想
- 扩展
- 类组装
- 框架基类
- Arr
- Arr扩展函数
- Date基类
- Dir
- Dir基类扩展函数
- Dom基类
- File基类
- Str基类
- Str随机字符
- Str操作函数
- Str随机创建
- Html基类
- Header基类
- Filter基类
- 框架核心
- 路由
- 路由信息
- 路由安装样本
- 路由逻辑原理
- 路由方法匹配
- 路由分组
- 路由构建
- 路由限制
- 路由规则
- 路由多语,多主题
- 路由常量
- 路由扩展
- 路由例
- 路由真静态使用
- 智能加载
- Response基类
- 定时任务
- 框架主类
- 控制器
- model
- model样本
- model使用
- view
- view路径
- view方法
- view配置
- view使用
- view真静态
- view例
- view多主题
- 模版引擎
- 模版引擎之单句解析
- 模版引擎之foreach解析
- cache
- cache注意事项
- cache配置
- cache方法
- cache使用
- cache扩展
- cache处理类File配置
- cache处理类Apc,Apcu配置
- cache处理类memcache,memcached配置
- cookie
- session
- 框架扩展
- Upload类
- 测试
- 测试流程
- 测试文件编写
- 测试文件例-数组篇
- 测试类函数
- 测试类使用
- 测试注意事项
- 常用功能
- 读码须知
- 个人技巧或习惯
- 万能get,call,callStatic
- &&和||
- 变量值交换
- trait拼接
- 多语支持