Permalink
Browse files

Introduce Stdlib\ArrayTools, refactor other components to use it.

- add Stdlib\ArrayTools which combines the following:
    - Stdlib\RecursiveArrayMerge
    - Stdlib\IteratorToArray
    - Stdlib\IsAssocArray
- add ArrayTools array testing functionality:
    - ::isList()
    - ::isHashTable()
    - ::hasNumericKeys()
    - ::hasIntegerKeys()
    - ::hasStringKeys()
- add more exhaustive unit tests for ArrayTools including edge-cases for different types of arrays
  • Loading branch information...
1 parent b407cae commit bc80c3a2a2fb89754b3c91e91c48e9644ef447a0 @Thinkscape Thinkscape committed Mar 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Paginator.php
View
@@ -34,7 +34,7 @@
Zend\Db\Table\Select as DbTableSelect,
Zend\Filter\Filter,
Zend\Json\Json,
- Zend\Stdlib\IteratorToArray,
+ Zend\Stdlib\ArrayTools,
Zend\View;
/**
@@ -263,7 +263,7 @@ public static function getAdapterBroker()
public static function setConfig($config)
{
if ($config instanceof Traversable) {
- $config = IteratorToArray::convert($config);
+ $config = ArrayTools::iteratorToArray($config);
}
if (!is_array($config)) {
throw new Exception\InvalidArgumentException(__METHOD__ . ' expects an array or Traversable');

0 comments on commit bc80c3a

Please sign in to comment.