(Yaf >=1.0.0)
Yaf_View_Simple::__set — Assign a variable via property write
Assigns a variable to the view. This method is called when writing to a property of a view object, and behaves the same as Yaf_View_Simple::assign().
nameThe name under which the variable becomes available to the template.
valueThe value to assign.
No value is returned.
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");
}
}
?>