title: PhpRenderer not rendering my view script from console route
body: <p>I've created a Console route on my zf2 application to dispatch an email via the command line. So in my action I am creating a new PhpRenderer as specified in the documentation (<a href="http://framework.zend.com/manual/2.0/en/modules/zend.view.renderer.php-renderer.html" rel="nofollow">http://framework.zend.com/manual/2.0/en/modules/zend.view.renderer.php-renderer.html</a>) to render my email template (replace variables etc) and dispatch it.</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>  $renderer = new \Zend\View\Renderer\PhpRenderer();
    $resolver = new \Zend\View\Resolver\TemplateMapResolver();
  
    $resolver-&gt;setMap(array(
      'mailTemplate' =&gt; $config['template']
    ));
  
    $renderer-&gt;setResolver($resolver);
  
    $model = new \Zend\View\Model\ViewModel();
    $model-&gt;setTemplate('mailTemplate');
  
    $model-&gt;setVariables(array(
      'recipient' =&gt; 'foo@bar.com'
    ));
  
    $emailBody = $renderer-&gt;render($model);
  </code></pre>
  
  <p>However it seems that the Phprenderer does not render any PHP in my <code>.phtml</code> file. The exact same code works correctly however if I execute it in a normal HTTP Request. </p>
  
  <p>Could anyone help me out with this?</p>