tutida/altair
最新稳定版本:1.0.1
Composer 安装命令:
composer require tutida/altair
包简介
Auto converting special characters of variables to HTML entities
README 文档
README
Auto converting special characters of variables to HTML entities
Requirements
- PHP >=5.4.16
- CakePHP >= ~3.0
Usage
<?php class AppController extends Controller { public function initialize() { $this->loadComponent('Altair.Altair'); } ... }
By doing above, You do not have to write the following(h()) every time.
<?= h($variable); ?>
If you do not want to escape $object, use $object->escape property.
<?php class UsersController extends AppController { public function add() { $user = $this->Users->newEntity(); ... $user->escape = false; $this->set('user', $user); } ... }
If you do not want to escape in the action, use $this->Altair->escape() method.
<?php class UsersController extends AppController { public function add() { $user = $this->Users->newEntity(); ... // Not escape $viewVars in this action. $this->Altair->escape(false); $this->set('user', $user); } ... }
统计信息
- 总下载量: 64.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-11-30