我需要在触发事件中呈现一个 phtml 文件。
我的代码是:
class Module
{
//...
public function onBootstrap(MvcEvent $e) {
$app = $e->getApplication ();
$sem = $app->getEventManager ()->getSharedManager ();
$sem->attach ( 'Events', 'onExampleEvent', function ($e) {
return 'html...';
} );
}
//...
}
我如何html...
用渲染的 phtml 文件替换?