Okay, sorry - my bad. I didn't catch what was happening. The block's "content" method is intended to SET content where the local variables and data is available. Example:
Controller:
$view->set('foo', 'apple');
View (or I guess you *could* do it in the controller):
// This SETS the block content using local data
$view->block('test')->content(function() use($view, $foo) {
echo $view->set('foo'); // or just "echo $foo;"
}
Layout:// This echos out the block content that was set in the view above via __toString
echo $view->block('test'); // echo set content