Yaf_View_Simple
PHP Manual

Yaf_View_Simple::clear

(PECL yaf >=2.2.0)

Yaf_View_Simple::clearClear Assigned values

说明

public bool Yaf_View_Simple::clear ([ string $name ] )

clear assigned variable

参数

name

assigned variable name

if empty, will clear all assigned variables

返回值

范例

Example #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
    
}
?>

参见


Yaf_View_Simple
PHP Manual