(Yaf >=1.0.0)
Yaf_View_Simple::assign — Atribui valores
Atribui valores ao mecanismo de visualização.
nameUma string ou um array.
Se for uma string, o argumento seguinte, $value, é obrigatório.
valueValor (mixed).
Exemplo #1 Exemplo de Yaf_View_Simple::assign()
<?php
class IndexController extends Yaf_Controller_Abstract {
    public function indexAction() {
        $this->getView()->assign("foo", "bar");
        $this->_view->assign( array( "key" => "value", "name" => "value"));
    }
}
?>Exemplo #2 Exemplo de modelo
<html>
 <head>
  <title><?php echo $foo; ?></title>
 </head>
<body>
  <?php
    foreach ($this->_tpl_vars as $name => $value) {
         echo $$name; // ou: echo $this->_tpl_vars[$name];
    }
  ?>
</body>
</html>