title: error in barcode Zend Framework 2
body: <p>I have a question about Barcode generation in Zend Framework 2.</p>
  
  <p>All the time I get an error : </p>
  
  <blockquote>
    <p>PHP Fatal error: Class 'Zend\Loader' not found in
    /var/www/vhosts/mydomain.com/httpdocs/vendor/ZendFramework/library/Zend/Validator/Barcode.php
    on line 110</p>
  </blockquote>
  
  <p>The code I use is :</p>
  
  <pre><code>    // Only the text to draw is required
      $barcodeOptions = array('text' =&gt; 'ZEND-FRAMEWORK');
  
      // No required options
      $rendererOptions = array();
  
      $imageResource = Barcode::factory(
          'code39', 'image', $barcodeOptions, $rendererOptions
      )-&gt;render();
  
      echo '&lt;pre&gt;';
      var_dump($imageResource);
  </code></pre>
  
  <p>When I delete the render function chained to the <code>barcode::factory</code> I see a <code>'Zend\Barcode\Renderer\Image'</code> object. When I run the render function I get the error.</p>
  
  <p>I've got the code from the Zend Framework documentation. I couldn't find good ZF2 documentation about this. Has anybody had this problem before? What can I do about it?</p>