Yaf_View_Simple::__set

(Yaf >=1.0.0)
Set value to engine
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.

Returns:
Examples:
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() -

Yaf_View_Interface::assign() -

doc_php
2016-02-24 16:07:32
Comments
Leave a Comment

Please login to continue.