title: Change layout in the controller of Zend Framework 2.0
body: <p>I am learning <strong>ZF2.0 beta</strong>. In ZF1 we can change layout on the fly in controller:</p>
  
  <pre><code>Zend_Layout::getMvcInstance()-&gt;setLayout('layoutname');
  </code></pre>
  
  <p>But in <strong>ZF2.0</strong> Zend\Layout class doesn't has method getMvcInstance(). I think that it can be made using dependency injections but not sure.</p>