Yaf_View_Simple::__set
(Yaf >=1.0.0)
Yaf_View_Simple::__set — 値をエンジンに設定する
説明
Yaf_View_Simple::assign() をもっと簡単にするもうひとつの方法です。
パラメータ
-
name -
変数名。
-
value -
変数の値。
返り値
例
例1 Yaf_View_Simple::__set() の例
<?php
class IndexController extends Yaf_Controller_Abstract {
public function indexAction() {
$this->getView()->foo = "bar"; // assign("foo", "bar"); と同じ意味
}
?>
参考
- Yaf_View_Simple::assignRef() - The assignRef purpose
- Yaf_View_Interface::assign() - 値をビューエンジンに代入する