title: It is possible to get Phalcon\Mvc\View rendered output in variable?
body: <p>I need to give back json object, that has property 'html' with rendered action.
  Is it possible to do natively with Phalcon vew?</p>
  
  <p>Example:</p>
  
  <pre><code>$posts = NewsPost::find(['limit' =&gt; 10]);
  $view = new Phalcon\Mvc\View();
  $view-&gt;setVar('posts', $posts);
  $view-&gt;setMainView('news/posts'); // not sure if this is correct
  
  // retrieve some data ...
  $response = [
      'html' =&gt; $view-&gt;render(),
      'somedata' =&gt; 'somevalues',
      ....
  ];
  </code></pre>
  
  <p>P.S. Question regarding phalcon php framework:
  <a href="http://docs.phalconphp.com/en/latest/api/Phalcon_Mvc_View.html" rel="nofollow">http://docs.phalconphp.com/en/latest/api/Phalcon_Mvc_View.html</a></p>