title: Include js and css in ZF2 using AJAX or not
body: <p>I have some views in ZF2 that must include js and css files.
  I can do so in view:</p>
  
  <pre><code>$this-&gt;headscript()-&gt;appendScript(...
  </code></pre>
  
  <p>But, when I get view result using ajax I need to get from server array with view html, css includes and js includes. Like this:</p>
  
  <pre><code>array(
      'html' =&gt; '&lt;div id="timepicker-wrap"&gt;&lt;/div&gt;',
      'js_include' =&gt; array('/js/timepicker.js'),
      'js_eval' =&gt; '$("#timepicker-wrap").timepicker()',
      'css_include' =&gt; array('/css/timepicker.css'),
  );
  </code></pre>
  
  <p>After I give this data to client-side my js library will include html, js and css.</p>
  
  <p>The problem is to get all js and css files and code from headscript in server-side.</p>
  
  <p>Am I right that I have to extend HeadScript, HeadStyle and InlineScript classes and add functions that returns all js and css? Or I have to do something else?</p>