Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Zend_Barcode Renderers

Renderers have some common options. These options can be set in four ways:

  • As an array or a Zend_Config object passed to the constructor.

  • As an array passed to the setOptions() method.

  • As a Zend_Config object passed to the setConfig() method.

  • As discrete values passed to individual setters.

Example 66. Different ways to parameterize a renderer object

= array('topOffset' => 10);

// Case 1
$renderer = new Zend_Barcode_Renderer_Pdf($options);

// Case 2
$renderer = new Zend_Barcode_Renderer_Pdf();

// Case 3
$config   = new Zend_Config($options);
$renderer = new Zend_Barcode_Renderer_Pdf();

// Case 4
$renderer = new Zend_Barcode_Renderer_Pdf();

Zend Framework