getRenderer() публичный Метод

Returns the renderer object that will be used to render templates
public getRenderer ( ) : Zend\View\Renderer\RendererInterface
Результат Zend\View\Renderer\RendererInterface
Пример #1
0
 public function testValidTemplateMakesBodyToBeMimeMessage()
 {
     $resolver = new TemplatePathStack();
     $resolver->addPath(__DIR__ . '/../../view');
     $this->mailService->getRenderer()->setResolver($resolver);
     $this->mailService->setTemplate('ac-mailer/mail-templates/mail.phtml');
     $this->assertInstanceOf('Zend\\Mime\\Message', $this->mailService->getMessage()->getBody());
 }
Пример #2
0
 public function testWithDefaultLayout()
 {
     $resolver = new TemplatePathStack();
     $resolver->addPath(__DIR__ . '/../../view');
     $this->mailService->getRenderer()->setResolver($resolver);
     $model = new ViewModel();
     $model->setTemplate('ac-mailer/mail-templates/layout.phtml');
     $this->mailService->setDefaultLayout(new DefaultLayout($model));
     $this->mailService->setTemplate('ac-mailer/mail-templates/mail.phtml');
     $this->assertInstanceOf('Zend\\Mime\\Message', $this->mailService->getMessage()->getBody());
 }