Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into hotfix/view-listener-from-null
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurian Sluiman committed Mar 9, 2012
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/Barcode.php
Expand Up @@ -27,7 +27,7 @@
Zend,
Zend\Loader\Broker,
Zend\Loader\ShortNameLocator,
Zend\Stdlib\IteratorToArray;
Zend\Stdlib\ArrayUtils;

/**
* Class for generate Barcode
Expand Down Expand Up @@ -130,7 +130,7 @@ public static function factory($barcode,
* barcode name and separate config object.
*/
if ($barcode instanceof Traversable) {
$barcode = IteratorToArray::convert($barcode);
$barcode = ArrayUtils::iteratorToArray($barcode);
if (isset($barcode['rendererParams'])) {
$rendererConfig = $barcode['rendererParams'];
}
Expand Down Expand Up @@ -181,7 +181,7 @@ public static function makeBarcode($barcode, $barcodeConfig = array())
* barcode name and separate configuration.
*/
if ($barcode instanceof Traversable) {
$barcode = IteratorToArray::convert($barcode);
$barcode = ArrayUtils::iteratorToArray($barcode);
if (isset($barcode['barcodeParams']) && is_array($barcode['barcodeParams'])) {
$barcodeConfig = $barcode['barcodeParams'];
}
Expand All @@ -192,7 +192,7 @@ public static function makeBarcode($barcode, $barcodeConfig = array())
}
}
if ($barcodeConfig instanceof Traversable) {
$barcodeConfig = IteratorToArray::convert($barcodeConfig);
$barcodeConfig = ArrayUtils::iteratorToArray($barcodeConfig);
}

/*
Expand Down Expand Up @@ -234,7 +234,7 @@ public static function makeRenderer($renderer = 'image', $rendererConfig = array
* barcode name and separate config object.
*/
if ($renderer instanceof Traversable) {
$renderer = IteratorToArray::convert($renderer);
$renderer = ArrayUtils::iteratorToArray($renderer);
if (isset($renderer['rendererParams'])) {
$rendererConfig = $renderer['rendererParams'];
}
Expand All @@ -243,7 +243,7 @@ public static function makeRenderer($renderer = 'image', $rendererConfig = array
}
}
if ($rendererConfig instanceof Traversable) {
$rendererConfig = IteratorToArray::convert($rendererConfig);
$rendererConfig = ArrayUtils::iteratorToArray($rendererConfig);
}

/*
Expand Down
4 changes: 2 additions & 2 deletions src/Object/AbstractObject.php
Expand Up @@ -28,7 +28,7 @@
Zend\Barcode,
Zend\Barcode\Object\Exception,
Zend\Validator\Barcode as BarcodeValidator,
Zend\Stdlib\IteratorToArray;
Zend\Stdlib\ArrayUtils;

/**
* Class for generate Barcode
Expand Down Expand Up @@ -225,7 +225,7 @@ public function __construct($options = null)
$this->getDefaultOptions();
$this->font = Barcode\Barcode::getBarcodeFont();
if ($options instanceof Traversable) {
$options = IteratorToArray::convert($options);
$options = ArrayUtils::iteratorToArray($options);
}
if (is_array($options)) {
$this->setOptions($options);
Expand Down
4 changes: 2 additions & 2 deletions src/Renderer/AbstractRenderer.php
Expand Up @@ -29,7 +29,7 @@
Zend\Barcode\Exception as BarcodeException,
Zend\Barcode\Object,
Zend\Barcode\Renderer,
Zend\Stdlib\IteratorToArray;
Zend\Stdlib\ArrayUtils;

/**
* Class for rendering the barcode
Expand Down Expand Up @@ -108,7 +108,7 @@ abstract class AbstractRenderer implements Renderer
public function __construct($options = null)
{
if ($options instanceof Traversable) {
$options = IteratorToArray::convert($options);
$options = ArrayUtils::iteratorToArray($options);
}
if (is_array($options)) {
$this->setOptions($options);
Expand Down

0 comments on commit 5651d65

Please sign in to comment.