在线文档教程
PHP
Yaf

Yaf_View_Simple::__set

Yaf_View_Simple::__set

(Yaf >=1.0.0)

Yaf_View_Simple::__set — Set value to engine

Description

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

This is a alternative and easier way to Yaf_View_Simple::assign().

Parameters

name

A string value name.

value

Mixed value.

Return Values

Examples

Example #1 Yaf_View_Simple::__set()example

<?php class IndexController extends Yaf_Controller_Abstract {     public function indexAction() {         $this->getView()->foo = "bar"; // same as assign("foo", "bar"     } ?>

See Also

  • Yaf_View_Simple::assignRef() - The assignRef purpose

  • Yaf_View_Interface::assign() - Assign value to View engine

← Yaf_View_Simple::render

Yaf_View_Simple::setScriptPath →

© 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

https://secure.php.net/manual/en/yaf-view-simple.set.php