« Yaf_View_Simple::render
Yaf_View_Simple::setScriptPath »

Yaf_View_Simple::__set

(Yaf >=1.0.0)

Yaf_View_Simple::__set — 値をエンジンに設定する

説明

public function Yaf_View_Simple::__set(string $name, mixed $value): void

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"); と同じ意味
    }
}
?>

参考

関連キーワード:
View   エンジン   assign   変数   assignRef   render   setScriptPath   mixed   方法   IndexController   extends   Controller   Abstract   indexAction   getView   意味   参考   Interface   ビュー   代入
関連する関数・ページ:
yaf-view-simple.assign   yaf-view-simple.assignref   yaf-view-simple.clear   yaf-view-interface.assign   class.yaf-view-simple   yaf-view-simple.construct