PHP - Manual: Yaf_View_Simple::clear
2024-11-15
(Yaf >=2.2.0)
Yaf_View_Simple::clear — Clear Assigned values
$name
= ?): bool清除指定的变量
name
分派的变量名
如果为空,将会清除所有的变量
示例 #1 Yaf_View_Simple::clear()example
<?php
class IndexController extends Yaf_Controller_Abstract {
public function indexAction() {
$this->getView()->clear("foo")->clear("bar"); // clear "foo" and "bar"
$this->_view->clear(); //clear all assigned variables
}
?>
官方地址:https://www.php.net/manual/en/yaf-view-simple.clear.php